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

Illustrator cursor is too big #48

Open
djrrb opened this issue Jun 14, 2016 · 4 comments
Open

Illustrator cursor is too big #48

djrrb opened this issue Jun 14, 2016 · 4 comments

Comments

@djrrb
Copy link
Owner

djrrb commented Jun 14, 2016

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
Copy link
Collaborator

RoelN commented Jun 18, 2016

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
Copy link

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
Copy link
Owner Author

djrrb commented Jul 5, 2024

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
Copy link
Collaborator

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.

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

No branches or pull requests

4 participants