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 upImplement Synthetic Bold Support #1653
Closed
Comments
|
Ah found an example by grabbing something from adobe's free font collection:
|
|
Gecko+webrender today does everything right except the last one, because it sends us double glyphs to emulate the bold, but in that case expects transparency to be implemented by the DrawTarget. |
bors-servo
added a commit
that referenced
this issue
Dec 4, 2017
fake bold for Mac font backend Mac is the only platform that did not yet support synthetic bold. This solves it by using multi-striking in the same way Gecko does. This resolves #1653 and https://bugzilla.mozilla.org/show_bug.cgi?id=1394570 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2155) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some fonts don't natively support bold, and force the browser to synthesize them. The synthesis is fairly simple: draw each glyph multiple times, with horizontal offset. In fact servo/gecko could just feed us multiple copies of each char to do it for us... except that wouldn't produce the correct result for transparent text. Requiring the browser to generate a stacking context with transparency would be wasteful, I think.
"synthetic bold" should be made a font instance key, as introduced in #1602
Sadly, I don't have a good synthetic-bold-needing example yet.