Closed thany closed 9 years ago
Can you open that file and copy the <font-face/>
tag?
Ah, from the SVG I assume :) Here it is:
<font-face units-per-em="2048" ascent="1536" descent="-512" />
Hopefully this helps.
Theorically, the <font-face/>
tag should have an accent-height
attribute which specifies how tall can be glyphs with accents. (However, LOTS of fonts don't use it :unamused:)
I could just add some more space so that, if the glyph exceeds the value specified in ascent
and descent
, it won't be cropped.
Isn't it possible to work out a workable accent-height
from the other attributes? Otherwise the quickest solution (at least for the moment) might indeed simply be some extra space.
If only we'd know how browsers/OSes handle this sort of thing...
For now, I have just added some space at the top of the glyphs...
You can download the "fixed" version of the extension: https://github.com/nicolo-ribaudo/brackets-svg-font/releases/download/v0.4.5-pre.0/nicolo-ribaudo.brackets-svg-font.v0.4.5-pre.0.zip
Isn't it possible to work out a workable
accent-height
from the other attributes?
I think I could parse the d
attribute... I'm going to fix this next week.
Fixed :smile:
Please compare these two:
The capital A has a tilde over it, but it's cropped. Perhaps because glyphs are cropped at the CapHeight border. The accents certainly don't exceed above the WinAscent border.
Windows 7 x64, Brackets 1.3, latest freshest FontForge.