kreativekorp / bitsnpicas

Bits'N'Picas - Bitmap & Emoji Font Creation & Conversion Tools
337 stars 24 forks source link

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

Open SerenaOculis opened 1 month ago

SerenaOculis commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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

gingerbeardman commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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.