Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sendable/copyable lightweight font descriptors #99

Closed
burg opened this issue Oct 9, 2012 · 0 comments
Closed

Sendable/copyable lightweight font descriptors #99

burg opened this issue Oct 9, 2012 · 0 comments

Comments

@burg
Copy link

@burg burg commented Oct 9, 2012

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 FontCache per task. This has the downside of doubling the number of fonts that must be loaded into memory. The upside is that Font instances can be garbage-collected per-task.

An alternative design is to share Fonts across tasks, using RWARC or something similar. Currently, fonts are immutable, but in general they are not—native resources such as Quartz/FreeType font objects (CTFont, etc) are owned by Font instances, as are per-font Azure (cairo_font_face_t, cairo_scaled_font_t) and Harfbuzz blobs (hb_font_t, hb_face_t).

@burg burg closed this Nov 7, 2012
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.
glennw added a commit to glennw/servo that referenced this issue Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.