Commit graph

7 commits

Author SHA1 Message Date
Glenn Watson
1827852810 Add support for local font faces. Improves fonts on rust lang and guide. 2014-10-14 15:59:08 +10:00
Glenn Watson
a70850c261 Fix selection of fallback fonts. Fixes monospace fonts in rust guide.
Previously, any font template that could not be found would return
an item from the last resort font family. Now, the last resort font
family is only searched if the entire list of supplied font families
is empty.
2014-10-13 15:39:53 +10:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Jack Moffitt
e10206e91e Reinstate errors for unused variables and imports. 2014-09-13 23:38:00 -06:00
Glenn Watson
986db8073b Print debug message instead of fail when unable to load web font. Fixes #3301. 2014-09-12 14:32:53 +10:00
Glenn Watson
cc24e68186 Improve quality of font rendering on Linux (and Android).
The freetype hinting only works on integer pixel sizes. For this
reason, the advance width metrics for a font of size 12.99 are
the same as the advance metrics for a font of size 12.0. This
results in small fonts appearing to overlap slightly, which is
particularly noticeable on parts of Wikipedia. Round the font
size up to a pixel boundary inside the freetype system.

Also fetch the system default fonts for the generic font families
rather than hard coding them.

These two changes make the font rendering on Linux very close
to the Firefox font rendering on Wikipedia.
2014-09-10 07:29:40 +10:00
Jack Moffitt
c6ab60dbfc Cargoify servo 2014-09-08 20:21:42 -06:00
Renamed from src/components/gfx/font_cache_task.rs (Browse further)