How to keep stroke width unchanged when scaling a font

Hello, how can I keep the stroke width unchanged after scaling a font? The current scaling script changes the stroke width. For the example of only scaling horizontally, the stroke width should remain unchanged after scaling.

Before scaling, the stroke width was 73

The stroke width is 66 after scaling.

Can it keep stroke width unchanged when scaled, just like FontLab does? I think when scaling only in one direction, the stroke width should stay the same. Thank you!

You need to use two glyph transformations. In my example, the stroke width was 166 before scaling. As expected, after scaling down by 90% that becomes 149, so I need to make it bolder by 16 funits, or 8 x 2.

I know what you mean, but for variable fonts, bolding may cause the contour points to not match up.

Hey @ErwinDenissen, did you forget about this place?

I have added support for this.

You can download the unofficial update here:
http://high-logic.com/tmp/fontcreator/FontCreatorSetup16.0.0.3083.exe

I am looking forward to your findings!

Thank you so much! However, there’s an issue: the script has been running for over an hour and still hasn’t finished processing the large character set with more than 40,000 characters. Could you please help fix this? Thank you!

It can take a while. Do you see any progress?

The progress bar is moving slowly; it may take over 2 hours to complete.

I hope the result was worth waiting.

If you just want to experiment, you can always decide to apply the Scale feature on a small selection of glyphs.

I tried scaling 6,766 Chinese characters, and after 30 minutes, the progress was only 50%. For variable fonts, selecting all layers makes the process even slower. I hope over 40,000 characters can be scaled in just a few seconds. Could you please optimize this? Thank you!

Scaling that many glyphs in just a few seconds is unfortunately not realistic. FontCreator has to analyze and process the geometry of every glyph, and with variable fonts this may also need to be done for multiple layers.

We can take another look at the process, but I do not expect that it can be reduced from many minutes to just a few seconds.

If processing speed is more important than the geometry-aware scaling, you can use the old Scale feature instead, which is much faster.

Scripts for other things like bolding, thinning, and rounding corners can process more than 40,000 characters in just a few seconds. Is scaling really unable to do that? Can it be optimized as much as possible? Even a few minutes would be acceptable. The current time is too long. It takes more than two hours to finish processing. Thank you very much!

I did a quick test on 22 glyphs, just to make sure the feature is working.

This is the original:

I then applied this transformation:

I then exported it as variable font and opened it again in FontCreator:

I did the same in FontLab 8:

And exported it and then opended it on FontCreator:

So, yes FontCreator takes a lot more time, but in my opinion it does a better job, so for me it is worth waiting.

Okay, it seems this isn’t suitable for large font library scaling. Thank you for your efforts.