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

EDITED - Feature Request: Glyphs set bounding boxes automatically #58

Open
SerenaOculis opened this issue Sep 29, 2024 · 6 comments
Open

Comments

@SerenaOculis
Copy link

I have to assume I'm doing something wrong, and perhaps I am, but it appears as though when I add glyphs to a font they overlap by default, almost as if their width were null. This happens both in the preview section of the app itself and after exporting to a TrueType file.
imagen
imagen

@gingerbeardman
Copy link

gingerbeardman commented Sep 29, 2024

You need to set the bounding box of the glyph. Without that all characters will have a width of zero and display as you have seen.

Adjust the coloured lines as in this screenshot:

image

@SerenaOculis
Copy link
Author

A-HA! I knew it had to be something silly on my end, woops. Oh well. I do still think starting this thread is probably going to be useful for anyone who hopes to use this software in the future, because the idea of dragging one of the indicators around to signal where the glyph ends would have never occured to me; I thought they were there to serve as guides to font design. Either way, thanks for replying! Maybe I could turn this into a feature request to make bounding boxes set themselves automatically, but for now, I'll consider it solved. Have a nice day!

@SerenaOculis SerenaOculis changed the title Font glyphs overlap by default EDITED - Feature Request: Glyphs set bounding boxes automatically Sep 29, 2024
@SerenaOculis
Copy link
Author

Actually, I'll just leave it as such right now. I think it would be useful to have this as a feature; perhaps as one that can be configured by the user to allow for bounding boxes to automatically be set to a given horizontal distance in bits from the furthest bit in the glyph. I know a similar functionality already exists, in the form of the bounding box display function, but from my experience the application doesn't automatically configure the glyph bounding box to the one it displays with said function

@SerenaOculis SerenaOculis reopened this Sep 29, 2024
@gingerbeardman
Copy link

gingerbeardman commented Sep 29, 2024

I do think auto-bounding box would be useful. Or a "fit bounding box to current glyph" command, maybe. edit: I think you're also suggesting that.

BTW if you want the same bounding box across, let's say A-Z glyphs, for example a monospaced font, then you can set the bounding box on a blank character, copy, select all glyphs you want it on and paste.

@SerenaOculis
Copy link
Author

My suggestion is to add a setting that allows the user to do one of a few things:

  1. Keep setting bounding boxes manually on each glyph, like it functions currently.
  2. Set a global bounding box and apply it to the entire font (useful for monospacing)
  3. Set a bounding box "horizontal distance", which when set to 0 would set every character's bounding box to the pixel with the highest horizontal axis offset (in that particular character), when set to 1 would set every character's bounding box one pixel away from the horizontally farthest pixel, and so on (useful for fonts with variable glyph width that want to make every character get a little "breathing room", which happens to be what I'm using BitsNPicas to develop in the first place.)

@SerenaOculis
Copy link
Author

The last thing sounds complex to me with my limited knowledge, and I'm certain I would have a hard time implementing it, however there's already a function that automatically shows you a bounding box that contains the glyph in the character editor; this would be a very similar thing assuming setting the actual character bounding box isn't much harder than showing a square around the current glyph.

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