Mark2Mark / show-stems-pro-plugin

2 stars 0 forks source link

The horizontal guide is not shown when x-Height is missing in font info #10

Closed boomwooq closed 1 month ago

boomwooq commented 1 year ago

Hi Mark, I'm unsure why my horizontal measurement is not shown; I'm on the Pro version— Glyphs 3 (3.2 (3207)). Noted that it was like this even before I updated to the cutting-edge version; In case there are some settings I don't know about.

Thank you in advance! Boom

CleanShot 2023-07-22 at 12 44 31@2x CleanShot 2023-07-22 at 12 46 07@2x CleanShot 2023-07-22 at 12 46 29@2x
Mark2Mark commented 1 year ago

Hi @boomwooq,

Thanks for the report. Maybe it is just out of the view somehow.

would you mind to run this from your Macro Panel and let me know what it prints out?

print(Glyphs.defaults["com_markfromberg_ShowStems_horizontalBeamPosition"])
print(Glyphs.defaults["com_markfromberg_ShowStems_verticalBeamPosition"])

It should print two numbers, both with somehow rational values.

You can then also try to set the vertical beam position:

Glyphs.defaults["com_markfromberg_ShowStems_horizontalBeamPosition"] = 300

It won’t update right away, you will also need to turn the plugin off and on again. Maybe then it will show at y position 300.

From your results we can then investigate further.

boomwooq commented 1 year ago

Hi @Mark2Mark I run the first one; here is the result. But the second one doesn't show/ change anything even turn on and off plug-in. Another thing I found is that when it's not in the Italic setting, the plug-in works normally.

CleanShot 2023-07-23 at 10 53 52@2x
Mark2Mark commented 1 year ago

Thanks, @boomwooq!

  1. After you run the second one (which sets the horizontal beam to 300) does the first one then print 300?
  2. What do you mean with Italic setting? You mean the checkbox under Vertical Beam > Italic Angled?
  3. can you check which version you got? For this please run this from the Macro Panel:
    from AppKit import NSBundle
    bdl = NSBundle.bundleForClass_(NSClassFromString('Show_Stems_Pro'))
    print(bdl.objectForInfoDictionaryKey_('CFBundleShortVersionString'))
boomwooq commented 1 year ago

@Mark2Mark

  1. Yes, it changed, but the horizontal line is still invisible.
  2. I mean when the italic angle is set in Metrics in Glyphs info.
  3. My version is 3.1.9

https://github.com/Mark2Mark/show-stems-pro-plugin/assets/15804957/dc7f8ced-a6da-4799-9e64-02c25eab37c4

CleanShot 2023-07-23 at 11 15 13@2x
Mark2Mark commented 1 year ago

Thanks @boomwooq,

I just pushed an update. Not sure if it fixes it yet, but since that version works for me, maybe it does so for you too.

To get it quickly, you could uninstall the plugin and re-install it in Glyphs. Otherwise it could take a while for Glyphs to recognize that there is an update. If you run the version checking script, it should say 3.2.0.

Let mw know how it goes. Also much apologies for the inconvenience and thanks for your patience.

boomwooq commented 1 year ago

@Mark2Mark Thank you for the update! I did update to the new version. It's super odd to me why it still doesn't work, so I decided to check with other files, and it seems to be ok. So I decided to create the new file with the same setting.. went through a bit of transferring stuff and now it works! (on the right is the new file)

Anyway, I'm just here to update you! Thank you again for your help!

CleanShot 2023-07-23 at 12 03 40@2x
boomwooq commented 1 year ago

@Mark2Mark Oh wait, I figured it out! So the old file, I started by setting up the file in Thai script the right way without having an x-height value. And that's why it didn't show. As soon as I set up the x-height value, the line shows! Sorry for this!

Mark2Mark commented 1 year ago

@boomwooq thanks for this!

I think it has to do with the italic angle calculation, as that requires the x-Height (half of it actually) to determine the italic shifting for coordinates.

I think there is not much I can do about it, other than ask the user to have an x-Height set in the file.

One more question, @boomwooq: Is it okay in a Thai file to have an x-Height set? I ask because you said "setting up the Thai file the right way without having an x-Height".