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

ChangeWeight produces weird results on italic fonts #5361

Open
4 tasks done
tobiasBora opened this issue Jan 31, 2024 · 1 comment
Open
4 tasks done

ChangeWeight produces weird results on italic fonts #5361

tobiasBora opened this issue Jan 31, 2024 · 1 comment

Comments

@tobiasBora
Copy link

tobiasBora commented Jan 31, 2024

Thanks for this useful software. So if I load a font like the NimbusSanL-ReguItal.ttf:

NimbusSanL-ReguItal.zip

and open it + go to Element > Style > Change:

image

then most fonts are really weird, like:

image

I would for instance expect the lines caps not to be curved, the t to have a more regular shape… For instance, if I use LuaLaTeX with:

\newfontface\mySemibold{NimbusSanL-ReguItal.ttf}[
  FakeBold=2.5
]

I get a much better result:

image

Is it a bug, or am I missing something?

When reporting a bug/issue:

  • Screenshot
  • NixOs, tested on version 20220308 and 2023-01-01 with nix run 'github:NixOs/nixpkgs#fontforge-gtk'
  • The behavior you expect to see, and the actual behavior
  • Steps to reproduce the behavior
@skef
Copy link
Contributor

skef commented Jan 31, 2024

The ChangeWeight function has a set of heuristics that will sometimes more or less work and sometimes won't. You should think of it as something that might make changes that are close to what you need, which can be cleaned up by hand after. And even setting that general discouragement aside:

  1. Most of the testing of ChangeWeight was done with cubics, and this is a TrueType font with quadratic curves.
  2. It's known to be pretty dubious when it comes to italics, as well as any other "unusual" sort of font.

Still, as it turns out the font you're working with isn't an italic font, it's just a boring old san-serif font that's been slanted. So I tried the following:

  1. Select some letters you want to modify (I tried the lower case Latin glyphs)
  2. Open the Element -> Transformations ... -> Transform dialog and apply a 12 degree Withershins skew on those glyphs
  3. Run ChangeWeight on those glyphs
  4. Open the Element -> Transformations ... -> Transform dialog and apply a 12 degree Clockwise skew on those glyphs

And that result isn't too bad. Some of the needed cleanup is strange, like the lines that turn into curves -- those might have to do with the quadratics. But that's easy enough to deal with. The "e" closed up and needs some help. But overall the results are OKish.

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

No branches or pull requests

2 participants