Open Bug 620278 Opened 9 years ago Updated 2 years ago

disabling ligatures (e.g. in SVG text with rotated glyphs, or HTML text with letterspacing) doesn't work for Helvetica on OS X 10.6

Categories

(Core :: Layout: Text and Fonts, defect)

x86
macOS
defect
Not set

Tracking

()

People

(Reporter: heycam, Unassigned)

References

()

Details

(Whiteboard: [rdar://8787569])

Attachments

(1 file)

Attached image Reduced test
If an SVG <text> element has a rotate="" attribute, and the text includes characters that will be rendered as a ligature, then the ligature will not be rendered.

With the attached test on my Mac, whatever font sans-serif is mapping to must have an "fi" ligature, as that is not rendered.
We attempt to disable ligatures for rotated text in nsSVGGlyphFrame::GetTextRunFlags. I thought that was working on Mac. Does dynamic-text-04-ref.svg not work for you?
That test works for me unless I add a font-family="sans-serif" on the root.  It must be that the font "serif" maps to (at least on my machine) doesn't have an "fi" ligature.
It's down to the font backend to honour the disable ligatures flag. My understanding was that the Mac backend did so. Roc or Jonathan Kew would know more.
OK, so this is not an SVG bug; the same problem occurs with HTML text if letter-spacing is applied (which is supposed to disable ligatures). It seems to be specific to the Helvetica font; thus,

data:text/html,<p style="font-family:helvetica; letter-spacing: 1em">specified

shows the problem, while

data:text/html,<p style="font-family:arial; letter-spacing: 1em">specified

does not. Even the Light face of Helvetica is OK, as shown by:

data:text/html,<p style="font-family:helvetica; font-weight: 100; letter-spacing: 1em">specified

Checking the Typography palette in TextEdit.app, it doesn't show any features for Helvetica (although it does for Helvetica Light). I haven't tried exploring the actual font tables yet, but I suspect this may indicate a missing or broken 'feat' table, meaning that we don't get proper control of the AAT features.

Moving this to Layout:Text for now, but I suspect it's really an Apple font bug.
Component: SVG → Layout: Text
QA Contact: general → layout.fonts-and-text
Summary: SVG text with rotate attribute does not render ligatures → disabling ligatures (e.g. in SVG text with rotated glyphs, or HTML text with letterspacing) doesn't work for Helvetica on OS X 10.6
ftxdumperfuser (from the Apple font tool suite) shows that the Helvetica fonts have a 'morx' table but no 'feat' table.

Filed rdar://8787569 to report this to Apple.
Whiteboard: [rdar://8787569]
You need to log in before you can comment on or make changes to this bug.