Closed Bug 1424648 Opened 3 years ago Closed 3 years ago
Helvetica Bold drawn with non-bold glyphs
59 bytes, text/x-review-board-request
Setup: Nightly on Arch Linux WebRender enabled Helvetica.ttc sourced from MacOS High Sierra Helvetica Bold is drawn using metrics from the bold variant but with glyphs from the normal variant. Perhaps a glyph caching issue? Non-WebRender is fine.
Priority: -- → P2
I can only test Linux, I'm afraid.
There's a related problem where Helvetica Light picks the wrong glyphs and the string "abcdefgh" is drawn as "_`abcdef" with the Regular outlines but the correct metrics. E.g. the "f" has the Regular "d" outline but the Light "f" metrics. I think WebRender might be losing the face index needed to go with the font file somewhere. FontHandleMethods::new_from_template (servo/components/gfx/platform/freetype/font.rs) looks like it loads font data from a FontTemplateData, which holds a read font file, but the FontTemplateData only uses the pathname as its identifier and create_face_from_buffer always uses 0 as the face index.
for_each_variation (servo/components/gfx/platform/freetype/font_list.rs) also drops the font index on the floor.
The attached patch seems to fix things and renders all 6 of Helvetica's styles properly. That said I was flying blind and don't even know what (WR)FontDescriptorOutput is for. Perhaps some clarification before I can pack this up in a reviewable patch with a proper message?
Assignee: nobody → jan.steffens
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8947201 - Attachment is obsolete: true
Comment on attachment 8947221 [details] Bug 1424648 - Provide proper face index to FreeType FontDescriptorOutput; https://reviewboard.mozilla.org/r/216978/#review222830
Attachment #8947221 - Flags: review?(lsalzman) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/b8ad646de7a7 Provide proper face index to FreeType FontDescriptorOutput; r=lsalzman
You need to log in before you can comment on or make changes to this bug.