Plugin Author
pepe
(@pputzer)
Yes, that’s browser-specific fallback behavior for missing glyphs. As you can see from the generated markup, there’s no font-face change for any of the smart dashes, they are all part of the same text node as the surrounding letters.
Thread Starter
Derek
(@itsonlyinsane)
What is the unicode character that the plugin is trying to insert?
Plugin Author
pepe
(@pputzer)
You can see the named constants in this file from the PHP-Typography library. As for specific dashes, it depends on the selected dash style and position, but it’s unicode em-dash, en-dash, minus, etc. The specific algorithm can be found in the Smart Dashes fix.
Thread Starter
Derek
(@itsonlyinsane)
Thank you for those links.
I can see that the plugin is replacing the more generic “hyphen-minus” (U+002D) for the more specific “hyphen” (U+2010), and that it has been since 6.3.0.
Would it be possible to add a toggle to the plugin that switches that behavior on and off?
From the commit, I see you noted that the reason for making this change was dropping IE6 legacy support:
Use real Unicode hyphen instead of hyphen-minus (since IE6 is long dead).
I’m all for choosing the typographically correct options, but I think there are still too many fonts that don’t support the U+2010 hyphen.
-
This reply was modified 6 years, 11 months ago by
Derek.
Plugin Author
pepe
(@pputzer)
I’ll have to add a setting to PHP-Typography first. There is a ticket for that, but I have not had time to think about the design yet, so it will take some time.
Meanwhile, you could add a filter to the various hooks to replace the ´MINUSwith plain oldHYPHEN-MINUS`. This should fix the issue at the markup level.
-
This reply was modified 6 years, 11 months ago by
pepe.
Thread Starter
Derek
(@itsonlyinsane)
Thank you for that info.
I was curious and checked around for how many fonts support the character. 43/1728 font families on Adobe Typekit and 143/915 on Google Fonts.
Plugin Author
pepe
(@pputzer)
@itsonlyinsane I’ll change the default back in the next release.
Thread Starter
Derek
(@itsonlyinsane)
Thank you for the update!
Plugin Author
pepe
(@pputzer)
Progress can be tracked via GitHub.