-
-
Notifications
You must be signed in to change notification settings - Fork 706
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
Unwanted ligatures #490
Comments
The same problem for me with "Source Sans Pro" font and "ft" |
We could try to turn off the ligatures if there was access to the low-level fontkit api font.layout(lineTxt, { liga:false }) Related foliojs/fontkit#170 |
@fobdy Which file format are you trying to use? |
I'm using |
Hello @zimt28 @fobdy! As far as I'm aware this is an issue with pdf-lib/src/core/embedders/CustomFontEmbedder.ts Lines 52 to 57 in 193e48f
I'd be happy to accept a PR if anybody is interested in working on this. |
* Font features option for embedded fonts (#490) * Updated downlevel-dts * Typing `fontFeatures` to TypeFeatures * Reverting to `downlevel-dts@^0.5.0` * Updated EmbedFont Options with TypeFeatures * Add a test for TypeFeatures option
* Font features (#642) * Font features option for embedded fonts (#490) * Updated downlevel-dts * Typing `fontFeatures` to TypeFeatures * Reverting to `downlevel-dts@^0.5.0` * Updated EmbedFont Options with TypeFeatures * Add a test for TypeFeatures option * Update yarn.lock * Cleanup font features implementation * Cleanup Co-authored-by: Felipe Hefler <[email protected]>
Version pdf-lib/apps/node/tests/test6.ts Lines 37 to 40 in c957768
|
* Font features (#642) * Font features option for embedded fonts (#490) * Updated downlevel-dts * Typing `fontFeatures` to TypeFeatures * Reverting to `downlevel-dts@^0.5.0` * Updated EmbedFont Options with TypeFeatures * Add a test for TypeFeatures option * Update yarn.lock * Cleanup font features implementation * Cleanup Co-authored-by: Felipe Hefler <[email protected]>
Same problem with Garamond. |
Same problem with Caveat, disabling ligatures is not working |
@ephraimduncan For the Caveat font, setting
|
I want to use a font from
fonts.google.com
and am running into an issue.I've included the font (Nunito) like so:
This works, with one exception (there might be more, but this is what I could find):
Printing
fi
adds unwanted spacing after it which shouldn't be there, the Google preview also doesn't show it.fi ir fir
:I think the font has a special ligature for
fi
, if I install the font on my system I get the same connectedf
andi
letters, but without the spacing. Is this an issue withpdf-kit
orfontkit
?The text was updated successfully, but these errors were encountered: