djrrb / Bungee

A chromatic signage typeface for vertical and horizontal setting.
https://djr.com/bungee
SIL Open Font License 1.1
330 stars 42 forks source link

Illustrator cursor is too big #48

Open djrrb opened 8 years ago

djrrb commented 8 years ago

Getting a weird issue in Illustrator where the cursor and selection gets way larger than it should.

messages image 2188411056

I checked the vertical metrics and they don't seem too out of whack. Is it a bbox thing? It's odd because it seems just fine in apps like InDesign or TextEdit, and I never noticed it before.

screen shot 2016-06-14 at 4 17 41 am screen shot 2016-06-14 at 4 14 15 am
RoelN commented 8 years ago

I ran into a very similar with Typekit fonts in Chrome. When selected, the highlight would be a lot larger at the bottom. Apparently the highlighting algorithm of Chrome (and as it seems, Illustrator) looks at the yMax and yMin values in the head table. For Bungee this value is at -924, caused by the uni21AB.arrow character. That's nearly the full height of a regular character — is that intended? Removing it gives you proper selection highlighting in Illustrator.

You see the other screenshots have different spacing at the top and bottom, I don't know where this comes from, or why they don't look at the extremes like Illustrator seems to do. (For the yMin at least — yMax is at 1644 but the top half of the highlight is definitely not half a character extra.)

kenlunde commented 7 years ago

While I cannot confirm about the .ttf versions, at least for the .otf versions, I confirmed through experimentation that Illustrator—and Photoshop, which uses the same layout engine—uses the second element of the FontBBox array of the 'CFF ' table, not the head.yMin value, to determine the lower extent of character-selection highlighting.

djrrb commented 1 week ago

This is still the case with v2

Screenshot 2024-07-05 at 5 54 16 PM

@justvanrossum is this something that was going to be looked at for your revision, or should we just close this as Not Planned?

justvanrossum commented 1 week ago

This has not been on my radar, I'm sorry.

I don't have capacity to dive into this, but if someone can suggest how to fix it without changing the vertical metrics, I'm willing to try and implement it.