-
-
Notifications
You must be signed in to change notification settings - Fork 823
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
core: Include a regular subsetted Noto Sans as the default font #18353
Conversation
99eedad
to
ad3254e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? Note that this test clicks the "Green Only" button (see its input.json
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry. Somehow I thought it's obvious. But the = sign (e.g. in rows=5
) now looks like just a dash (-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you would have to render it in 1:1 scale and quality 1 to observe that. If we up the quality to 4 the second dash would probably be shown, but it's interesting it's missing on quality 1 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this looks bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what is going on here. The test actually includes a DefineFont3
for Noto Sans
, but it seems like we might still be falling back to the device font. I actually get the same rendering on desktop (I don't have Noto Sans
installed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be needed after #18437.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped this change.
This should be ready to review. I don't see any text rendering change that seems problematic. |
Just referencing harfbuzz/ttf-parser#122, in case it's added in the future. |
We need |
(Just a side-note: I keep getting confused whether "regular" means "not light and not bold" or "just a .ttf, not a blob extracted from a .swf"; and whether "subsetted" means "subscript" like ₜₕᵢₛ, or "not all unicode characters included" here. I assume it's the latter for both words though.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me but I'd really like to consider using metric compatible fonts at some point.
Which is also a kind of fun point, because from what I can tell Flash on Linux never used the "standard" fonts from Windows either. |
The idea is to include a regular TTF font file for font rendering, instead of first creating a SWF with the Noto Sans as an embedded font. I am using
pyftsubset
together with a list of unicode ranges matching specific Unicode blocks.This should make it quite easy to extend the included font in the future. Sadly
ttf_parser
doesn't support any of the newer compressed formats like WOFF. That is why I decided to manually apply deflate compression, which reduces the size by almost 50%.Fixes #14761