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

Install fonts-croscore or ttf-mscorefonts-installer into libreoffice docker image. #13319

Closed
defnull opened this issue Sep 28, 2021 · 12 comments
Closed

Comments

@defnull
Copy link
Contributor

defnull commented Sep 28, 2021

Is your feature request related to a problem? Please describe.
Presentations that use non-embedded Microsoft fonts look odd after conversion, e.g. bad kerning, jumping letters, small but noticeable visual differences.

Describe the solution you'd like
Install fonts-croscore (or ttf-mscorefonts-installer from debian contrib) while building the libreoffice docker image. This would make Microsoft fonts available to libreoffice and improve PDF creation. Perhaps also do the same in the BBB host install script, so PDF conversion (which happens on the host, not in docker) also better supports Microsoft fonts.

Other font packages may also be useful. I'm just guessing here.

@schrd
Copy link
Collaborator

schrd commented Sep 28, 2021

The fonts directory is mapped from the system into the container, so if you install these fonts in the host, they should be available during conversion.

See /usr/share/bbb-libreoffice-conversion/convert-local.sh line 40

@defnull
Copy link
Contributor Author

defnull commented Sep 28, 2021

Ahh good to know, thanks. So, adding these as dependencies to the BBB packages or in bbb-install.sh would be enough.

@defnull
Copy link
Contributor Author

defnull commented Sep 30, 2021

I installed lots of fonts locally on our BBB hosts and PDF->SVG conversion works now, but LibreOffice still produces bad PDFs (fonts replaced by non-matching standard fonts, missing gylphs, bad kerning).

I suspect that this is because the docker container mounts /usr/share/fonts/ but misses /etc/fonts (where proper font replacement rules are installed) and ~/.cache/fontconfig/ (font cache). I'm not entirely sure how font processing works for LibreOffice, but if it uses the fontconfig library, these at least /etc/fonts should also be mounted into the container. Running fc-cache or mounting a populated cache directory might also be required.

@h0jeZvgoxFepBQ2C
Copy link

Updated to BBB 2.3 and seeing this problem now... The standard fonts should be included in general..

@flyinghuman
Copy link

flyinghuman commented Oct 3, 2021

i'm seeing weird font mixings after updating to version 2.3.14 (from 2.3.13). Was there anything Font-related changed? mscorefonts are installed. Error is for example a "e" which is rotated by 90 degree counter-clockwise.

Edit: The Error seems to be endpoint / client related. So do not give it a high priority. I will test some browsers and configurations.

@paulmenzel
Copy link
Contributor

i'm seeing weird font mixings after updating to version 2.3.14 (from 2.3.13). Was there anything Font-related changed? mscorefonts are installed. Error is for example a "e" which is rotated by 90 degree counter-clockwise.

Edit: The Error seems to be endpoint / client related. So do not give it a high priority. I will test some browsers and configurations.

Yes, it’s a regression in Google Chrome and not visible in Mozilla Firefox.

@defnull
Copy link
Contributor Author

defnull commented Oct 4, 2021

Yes, the mangled or rotated glyphs are a recent Chrome bug and not related to this issue.

Can someone please add the bug issue label? Looks like installed fonts on the host are not fully available to LibreOffice as they should be. Mounting /usr/share/fonts/ is not sufficient.

@paulmenzel
Copy link
Contributor

Maybe create a new issue as the issue subject is about installing additional packages?

@ArminXG
Copy link

ArminXG commented Jan 25, 2022

I have the same problem with uploaded pdf file, the characters have different spaces.
But installing fonts-croscore does not help.

@h0jeZvgoxFepBQ2C
Copy link

h0jeZvgoxFepBQ2C commented Jan 25, 2022

We solved it then with following command 😄

apt-get install fonts-3270 fonts-adf-accanthis fonts-adf-baskervald fonts-adf-berenis fonts-adf-gillius fonts-adf-ikarius fonts-adf-irianis fonts-adf-libris fonts-adf-mekanus fonts-adf-oldania fonts-adf-romande fonts-adf-switzera fonts-adf-tribun fonts-adf-universalis fonts-adf-verana fonts-aksharyogini2 fonts-alee fonts-ancient-scripts fonts-aoyagi-kouzan-t fonts-aoyagi-soseki fonts-arabeyes fonts-arkpandora fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-arphic-ukai fonts-arphic-uming fonts-atarismall fonts-averia-gwf fonts-averia-sans-gwf fonts-averia-serif-gwf fonts-babelstone-han fonts-babelstone-modern fonts-baekmuk fonts-bebas-neue fonts-beng fonts-beng-extra fonts-beteckna fonts-blankenburg fonts-bpg-georgian fonts-breip fonts-cabin fonts-cabinsketch fonts-cantarell fonts-cardo fonts-century-catalogue fonts-circos-symbols fonts-cmu fonts-cns11643-kai fonts-cns11643-sung fonts-comfortaa fonts-comic-neue fonts-croscore fonts-crosextra-caladea fonts-crosextra-carlito fonts-cwtex-docs fonts-cwtex-fs fonts-cwtex-heib fonts-cwtex-kai fonts-cwtex-ming fonts-cwtex-yen fonts-dancingscript fonts-ddc-uchen fonts-dejavu fonts-dejavu-core fonts-dejavu-extra fonts-dejima-mincho fonts-deva fonts-deva-extra fonts-dkg-handwriting fonts-dosis fonts-droid-fallback fonts-dseg fonts-dustin fonts-dzongkha fonts-ebgaramond fonts-ebgaramond-extra fonts-ecolier-court fonts-ecolier-lignes-court fonts-eeyek fonts-elusive-icons fonts-emojione fonts-entypo fonts-essays1743 fonts-evertype-conakry fonts-f500 fonts-fantasque-sans fonts-fanwood fonts-farsiweb fonts-femkeklaver fonts-firacode fonts-font-awesome fonts-freefarsi fonts-freefont-otf fonts-freefont-ttf fonts-gargi fonts-georgewilliams fonts-gfs-artemisia fonts-gfs-baskerville fonts-gfs-bodoni-classic fonts-gfs-complutum fonts-gfs-didot fonts-gfs-didot-classic fonts-gfs-gazis fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-gfs-theokritos fonts-glewlwyd fonts-go fonts-goudybookletter fonts-gubbi fonts-gujr fonts-gujr-extra fonts-guru fonts-guru-extra fonts-hack fonts-hack-otf fonts-hack-ttf fonts-hack-web fonts-hanazono fonts-horai-umefont fonts-hosny-amiri fonts-hosny-thabit fonts-humor-sans fonts-inconsolata fonts-indic fonts-ipaexfont fonts-ipaexfont-gothic fonts-ipaexfont-mincho fonts-ipafont fonts-ipafont-gothic fonts-ipafont-mincho fonts-ipafont-nonfree-jisx0208 fonts-ipafont-nonfree-uigothic fonts-ipamj-mincho fonts-isabella fonts-johnsmith-induni fonts-jsmath fonts-junction fonts-junicode fonts-jura fonts-kacst fonts-kacst-one fonts-kalapi fonts-kanjistrokeorders fonts-karla fonts-kaushanscript fonts-khmeros fonts-khmeros-core fonts-kiloji fonts-klaudia-berenika fonts-knda fonts-komatuna fonts-konatu fonts-kouzan-mouhitsu fonts-kristi fonts-lao fonts-larabie-deco fonts-larabie-straight fonts-larabie-uncommon fonts-lato fonts-ldco fonts-league-spartan fonts-leckerli-one fonts-levien-museum fonts-levien-typoscript fonts-lexi-gulim fonts-lexi-saebom fonts-lg-aboriginal fonts-liberation fonts-liberation2 fonts-lindenhill fonts-linex fonts-linuxlibertine fonts-lklug-sinhala fonts-lmodern fonts-lobster fonts-lobstertwo fonts-lohit-beng-assamese fonts-lohit-beng-bengali fonts-lohit-deva fonts-lohit-deva-marathi fonts-lohit-deva-nepali fonts-lohit-gujr fonts-lohit-guru fonts-lohit-knda fonts-lohit-mlym fonts-lohit-orya fonts-lohit-taml fonts-lohit-taml-classical fonts-lohit-telu fonts-lyx fonts-maitreya fonts-manchufont fonts-materialdesignicons-webfont fonts-mathematica fonts-mathjax fonts-mathjax-extras fonts-meera-taml fonts-migmix fonts-mikachan fonts-misaki fonts-mlym fonts-mmcedar fonts-moe-standard-kai fonts-moe-standard-song fonts-mona fonts-monapo fonts-monlam fonts-monoid fonts-mononoki fonts-motoya-l-cedar fonts-motoya-l-maruberi fonts-mph-2b-damase fonts-mplus fonts-nafees fonts-nakula fonts-nanum fonts-nanum-coding fonts-nanum-eco fonts-nanum-extra fonts-naver-d2coding fonts-navilu fonts-noto fonts-noto-cjk fonts-noto-cjk-extra fonts-noto-color-emoji fonts-noto-hinted fonts-noto-mono fonts-noto-unhinted fonts-ocr-a fonts-ocr-b fonts-octicons fonts-oflb-asana-math fonts-oflb-euterpe fonts-okolaks fonts-oldstandard fonts-open-sans fonts-opendin fonts-opendyslexic fonts-opensymbol fonts-oradano-mincho-gsrr fonts-orya fonts-orya-extra fonts-oxygen fonts-pagul fonts-paktype fonts-pecita fonts-play fonts-powerline fonts-prociono fonts-quattrocento fonts-radisnoir fonts-ricty-diminished fonts-roboto fonts-roboto-fontface fonts-roboto-hinted fonts-roboto-slab fonts-roboto-unhinted fonts-rufscript fonts-sahadeva fonts-sambhota-tsugring fonts-sambhota-yigchung fonts-samyak fonts-samyak-deva fonts-samyak-gujr fonts-samyak-mlym fonts-samyak-orya fonts-samyak-taml fonts-sarai fonts-sawarabi-gothic fonts-sawarabi-mincho fonts-senamirmir-washra fonts-seto fonts-sil-abyssinica fonts-sil-andika fonts-sil-andika-compact fonts-sil-andikanewbasic fonts-sil-annapurna fonts-sil-charis fonts-sil-charis-compact fonts-sil-dai-banna fonts-sil-doulos fonts-sil-doulos-compact fonts-sil-ezra fonts-sil-galatia fonts-sil-gentium fonts-sil-gentium-basic fonts-sil-gentiumplus fonts-sil-gentiumplus-compact fonts-sil-harmattan fonts-sil-lateef fonts-sil-mondulkiri fonts-sil-mondulkiri-extra fonts-sil-nuosusil fonts-sil-padauk fonts-sil-scheherazade fonts-sil-sophia-nubian fonts-sil-taiheritagepro fonts-sil-zaghawa-beria fonts-sipa-arundina fonts-smc fonts-smc-anjalioldlipi fonts-smc-chilanka fonts-smc-dyuthi fonts-smc-karumbi fonts-smc-keraleeyam fonts-smc-manjari fonts-smc-meera fonts-smc-rachana fonts-smc-raghumalayalamsans fonts-smc-suruma fonts-smc-uroob fonts-stix fonts-symbola fonts-takao fonts-takao-gothic fonts-takao-mincho fonts-takao-pgothic fonts-taml fonts-taml-tamu fonts-taml-tscu fonts-telu fonts-telu-extra fonts-teluguvijayam fonts-texgyre fonts-thai-tlwg fonts-thai-tlwg-otf fonts-thai-tlwg-ttf fonts-thai-tlwg-web fonts-tibetan-machine fonts-tiresias fonts-tlwg-garuda fonts-tlwg-garuda-otf fonts-tlwg-garuda-ttf fonts-tlwg-kinnari fonts-tlwg-kinnari-otf fonts-tlwg-kinnari-ttf fonts-tlwg-laksaman fonts-tlwg-laksaman-otf fonts-tlwg-laksaman-ttf fonts-tlwg-loma fonts-tlwg-loma-otf fonts-tlwg-loma-ttf fonts-tlwg-mono fonts-tlwg-mono-otf fonts-tlwg-mono-ttf fonts-tlwg-norasi fonts-tlwg-norasi-otf fonts-tlwg-norasi-ttf fonts-tlwg-purisa fonts-tlwg-purisa-otf fonts-tlwg-purisa-ttf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-otf fonts-tlwg-sawasdee-ttf fonts-tlwg-typewriter fonts-tlwg-typewriter-otf fonts-tlwg-typewriter-ttf fonts-tlwg-typist fonts-tlwg-typist-otf fonts-tlwg-typist-ttf fonts-tlwg-typo fonts-tlwg-typo-otf fonts-tlwg-typo-ttf fonts-tlwg-umpush fonts-tlwg-umpush-otf fonts-tlwg-umpush-ttf fonts-tlwg-waree fonts-tlwg-waree-otf fonts-tlwg-waree-ttf fonts-tomsontalks fonts-tuffy fonts-ubuntu fonts-ubuntu-console fonts-ubuntu-font-family-console fonts-ubuntu-title fonts-ukij-uyghur fonts-umeplus fonts-unfonts-core fonts-unfonts-extra fonts-unikurdweb fonts-uralic fonts-urw-base35 fonts-vlgothic fonts-vollkorn fonts-wine fonts-woowa-hanna fonts-wqy-microhei fonts-wqy-zenhei fonts-yanone-kaffeesatz fonts-yozvox-yozfont fonts-yozvox-yozfont-antique fonts-yozvox-yozfont-cute fonts-yozvox-yozfont-edu fonts-yozvox-yozfont-new-kana fonts-yozvox-yozfont-standard-kana fonts-yrsa-rasa

@defnull
Copy link
Contributor Author

defnull commented Jan 25, 2022

Installing fonts on the host system only works if you install the exact same fonts referenced from the document, because /etc/fonts containing font replacement rules for similar fonts is not mounted to the container. This is an incomplete solution.

I'd suggest either also mount /etc/fonts to containers, or even better: create container images with fonts installed and not mount /usr/share/fonts/ at all.

@stale
Copy link

stale bot commented Oct 22, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status: stale label Oct 22, 2022
@stale stale bot closed this as completed Jan 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants