I’ve had a request to include installing fonts with Lifeboat. I seem to recall there being some kind of documentation for this, but I can’t find anything current. Google presents a years old thread that I’m not sure is still relevant.
Does anybody have information or references for installing fonts for Xojo Web currently?
PDFDocument has AddFonts which seems to imply you can store them anywhere.
For MBS Xojo ChartDirector Plugin and MBS Xojo DynaPDF Plugin you can specify where fonts are, so it may not matter where you decide to include them.
Otherwise check “/usr/share/fonts/truetype” folder.
1 Like
This is current. I use @font-face with my own TTF fonts, stored in a web space:
https://www.w3schools.com/cssref/css3_pr_font-face_rule.asp
sudo cp *.ttf *.TTF /usr/share/fonts/truetype/
sudo cp *.otf *.OTF /usr/share/fonts/opentype/
sudo fc-cache -f -v
At least for Debian based distros.
Any app should use such fonts using system APIs after this.
You can list the current fonts and where they are (file, name and style) using the command fc-list after.
For Lifeboat, fc-list probably should be the first thing to do, to avoid copying the same font again, detecting if it is already present somewhere (yes, they can be in weird places too, like /usr/share/fonts/myfonts)
1 Like
If you don’t find any of those sub folders after
/usr/share/fonts/
create them.
You can group styles for a font under a named folder. e.g.:
ls -al /usr/share/fonts/truetype/dejavu
total 2824
drwxr-xr-x 2 root root 4096 abr 17 2020 .
drwxr-xr-x 3 root root 4096 abr 17 2020 ..
-rw-r--r-- 1 root root 705684 jul 30 2016 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 331992 jul 30 2016 DejaVuSansMono-Bold.ttf
-rw-r--r-- 1 root root 340712 jul 30 2016 DejaVuSansMono.ttf
-rw-r--r-- 1 root root 757076 jul 30 2016 DejaVuSans.ttf
-rw-r--r-- 1 root root 356088 jul 30 2016 DejaVuSerif-Bold.ttf
-rw-r--r-- 1 root root 380132 jul 30 2016 DejaVuSerif.ttf
fc-cache will walk the tree and register them.