Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy in "units per em" between font and SVG #171

Open
gsteemso opened this issue Apr 7, 2024 · 7 comments
Open

Discrepancy in "units per em" between font and SVG #171

gsteemso opened this issue Apr 7, 2024 · 7 comments

Comments

@gsteemso
Copy link

gsteemso commented Apr 7, 2024

I tried BirdFont for the first time yesterday and found it rather frustrating in several respects; most are likely due to operator inexperience, but the issue of attempting to set measurements gave me some real difficulties. I started using the program the easy way, by playing with a copy of an existing font; it had 1024 units per em, and contained no fractional measurements to bloat the file. Alas, as it turned out on examination of the output, BirdFont appears to have been thinking in SVG terms internally, at only 100 units per em! This makes it almost impossible to get accurate positioning of anything. I couldn't find any way to alter that setting from within the program; as such, I'm going to try mucking with the value in the saved XML and see if that achieves anything.

@gsteemso
Copy link
Author

gsteemso commented Apr 7, 2024

Nope, turns out doing it that way would require recalculating every single control-point co-ordinate in the entire font. Not an option.

@johanmattssonm
Copy link
Owner

Thank you. I have not thought about this before. Would allowing adding an UPM field to the SVG export solve the problem? Do I need to make it possible to customize units in the program as well?

@gsteemso
Copy link
Author

gsteemso commented Apr 9, 2024 via email

@johanmattssonm
Copy link
Owner

Thank you. That is a great suggestion.

@johanmattssonm
Copy link
Owner

johanmattssonm commented Apr 22, 2024

Hi. I am still thinking about a good solution but I am not sure exactly what you need.

Using other coordinate systems for the object tools is probably easy:
0e14ccc3523b98905ce00c6995e59b3f

Updating LSB, RSB and kerning is probably also pretty straight forward.

Are there more places where it would be beneficial to use a custom UPM? I am thinking of a solution where the units in the .bf file still are 100 UPM but the designer can chose any UPM to be displayed in the GUI.

@johanmattssonm
Copy link
Owner

johanmattssonm commented Apr 22, 2024

Question number two: should the size of imported SVG files also change? My guess is no but I would like to know what you think.

@gsteemso
Copy link
Author

Well, my specific concern was in terms of editing a font in such a way as to not require that fractional measurements be stored in the actual output file, the one your OS tries to load. (When the font contains tens of thousands of characters, the bloat that would introduce is horrifying.) From that perspective, you want to be able to position things using the same units-per-em that the font file is using -- which can be specified by the app when creating from scratch, but is already a fixed value when editing an existing font.

From that perspective, I'm unclear on the utility of being able to specify other coördinate scales. I'm about as far as you can get from a professional typographer, so I am very aware that such a use may exist – I'm just saying I don't know of one.

I confess that I haven't done much at all with SVG stuff. I haven't any experience from which to comment on that aspect of it. I'm sorry I can't offer any useful perspective there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants