Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSendable/copyable lightweight font descriptors #99
Labels
Comments
ChrisParis
pushed a commit
to ChrisParis/servo
that referenced
this issue
Sep 7, 2014
Add a test for non-support of the layout attribute on tables.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In preparation for having non-hardcoded fonts, we need a way to communicate a specific font instance between layout and rendering tasks. A font instance encapsulates a font face, scale, and options such as bold, italic. Gecko has several different functions for serializing a font name, and other data is easily copied.
The current model is one
FontCacheper task. This has the downside of doubling the number of fonts that must be loaded into memory. The upside is thatFontinstances can be garbage-collected per-task.An alternative design is to share
Fonts across tasks, usingRWARCor something similar. Currently, fonts are immutable, but in general they are not—native resources such as Quartz/FreeType font objects (CTFont, etc) are owned byFontinstances, as are per-font Azure (cairo_font_face_t,cairo_scaled_font_t) and Harfbuzz blobs (hb_font_t,hb_face_t).