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

Is it possible to add custmoized font? #18

Open
diy10264 opened this issue Apr 15, 2019 · 4 comments
Open

Is it possible to add custmoized font? #18

diy10264 opened this issue Apr 15, 2019 · 4 comments

Comments

@diy10264
Copy link

When document containes some WordArt or special font, the result seems unapplicable. Some word and font style was lost and layout was changed.

This issues may be caused by LibreOffice. Are there any method to add own font for each convertion task?

@vladholubiev
Copy link
Owner

vladholubiev commented Apr 15, 2019

Hey @diy10264

I assume it works similar way how you add fonts on Linux system, except some AWS Lambda quirks.

I don't know will it help with LibreOffice, but I've seen people adding fonts to AWS Lambda for headless Chrome: https://gist.github.com/nat-n/c3429d29f2478ccb3de243810bb12956

Let me know if you find a solution that works for you and I'll add it to the README

@ncruces
Copy link

ncruces commented Jul 13, 2019

Adding fonts files to instdir/share/fonts/truetype is enough.

I've added all fonts from these sources, to good effect:
https://packages.ubuntu.com/bionic/ttf-mscorefonts-installer
https://gist.github.com/maxwelleite/10774746

EDIT:
Actually, this is the better way to get all those font files manually:
https://www.linuxquestions.org/questions/mageia-97/inpossibility-to-install-ms-core-fonts-4175603366/#post5694251

These are all the more common Windows fonts, and add about 5 MB (compressed) and 17Mb (uncompressed) to the distribution.

@randombluff
Copy link
Contributor

download fonts into the tmp folder directly,
also add file font.conf(base Amazon Linux 1 file you can find here alixaxel/chrome-aws-lambda#37 (comment)) and variables

// process.env.FONTCONFIG_PATH = "/tmp/fonts";
// process.env.FONTCONFIG_FILE = "/var/task/fonts/font.conf"

@iamkeyur
Copy link

#19 Does adding fonts make a difference to formatting?

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

5 participants