Commit graph

409 commits

Author SHA1 Message Date
Jack Moffitt
e10206e91e Reinstate errors for unused variables and imports. 2014-09-13 23:38:00 -06:00
glennw
883fc2e404 Merge pull request #3298 from glennw/fix-font-cache
Reduce number of font instances and shaper structures created.
2014-09-13 05:51:00 +10:00
Bryan Bell
0e86679464 Store one RenderState per-pipeline in the Compositor
This can later be used to decide whether the entire pipeline is ready
for rendering.
2014-09-12 10:47:51 -07: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
df48e33926 Fix comment and and reference to bug #3300 2014-09-12 14:00:55 +10:00
Glenn Watson
9ec3c9374d Reduce number of font instances and shaper structures created.
The font cache previously kept weak references to the fonts,
however in layout these fonts are dropped before they are
referenced again, so no caching was being used.

For now, just hold a strong reference in the cache, which means
that fonts will never be thrown out (this will need to be fixed
in the future).
2014-09-12 13:17:44 +10:00
Glenn Watson
d218815394 Define constant parameters strings as statics. 2014-09-10 07:29:40 +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