WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Fonts  (Read 10643 times)

Offline Sasha

  • Wiki Author
  • Newbie
  • *****
  • Posts: 10
Re: Fonts
« Reply #15 on: December 14, 2023, 08:07:30 AM »
Good afternoon I want to install cirillic fonts. I follow the steps written above, but after a reboot all changes disappear. Please tell me what is my mistake?

Code: [Select]
tc@TinyPC:~$ sudo su
root@TinyPC:/home/tc# cp -R /mnt/sdc1/cyrillic /usr/local/share/fonts
root@TinyPC:/home/tc# cd ../
root@TinyPC:/home# cd ../
root@TinyPC:/# ls
bin      home     linuxrc  proc     sbin     usr
dev      init     mnt     
root     sys      var
etc      lib      opt      run      tmp
root@TinyPC:/# cd usr/local/share/fonts/cyrillic
root@TinyPC:/usr/local/share/fonts/cyrillic# ls
PTC55F.ttf               
PTM75F.ttf               
PTZ55F.ttf
PTC75F.ttf               
PTN57F.ttf               
PTZ56F.ttf
PTF55E.ttf               
PTN77F.ttf               
cyrillic.ttf
PTF55F.ttf               
PTS55E.ttf               
koi8-r_bold.ttf
PTF56F.ttf               
PTS55F.ttf               
koi8-r_bold_italic.ttf
PTF75F.ttf               
PTS56F.ttf               
koi8-r_bold_regular.ttf
PTF76F.ttf               
PTS75F.ttf               
koi8-r_italic.ttf
PTM55F.ttf               
PTS76F.ttf               
ubuntu_regular.ttf
root@TinyPC:/usr/local/share/fonts/cyrillic# mkfontscale
root@TinyPC:/usr/local/share/fonts/cyrillic# mkfontdir
root@TinyPC:/usr/local/share/fonts/cyrillic# ls
PTC55F.ttf               
PTN57F.ttf               
cyrillic.ttf
PTC75F.ttf               
PTN77F.ttf               
fonts.dir
PTF55E.ttf               
PTS55E.ttf               
fonts.scale
PTF55F.ttf               
PTS55F.ttf               
koi8-r_bold.ttf
PTF56F.ttf               
PTS56F.ttf               
koi8-r_bold_italic.ttf
PTF75F.ttf               
PTS75F.ttf               
koi8-r_bold_regular.ttf
PTF76F.ttf               
PTS76F.ttf               
koi8-r_italic.ttf
PTM55F.ttf               
PTZ55F.ttf               
ubuntu_regular.ttf
PTM75F.ttf               
PTZ56F.ttf

    [EDIT]: Added  code  tags.  Rich
« Last Edit: December 14, 2023, 09:21:02 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11660
Re: Fonts
« Reply #16 on: December 14, 2023, 09:19:08 AM »
Hi Sasha
Welcome to the forum.

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14827
Re: Fonts
« Reply #17 on: December 14, 2023, 09:31:43 AM »
Good afternoon I want to install cirillic fonts. I follow the steps written above, but after a reboot all changes disappear. Please tell me what is my mistake?

By default nothing is saved on reboot.

Either add the font files to your backup or, better, make an extension out of them.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11660
Re: Fonts
« Reply #18 on: December 14, 2023, 09:43:29 AM »
Hi Sasha
Your mistake was copying to  /usr.
Most of the directories get rebuilt from scratch every time
you reboot. The right way to do this is to create an extension.
Try this:
Code: [Select]
tce-load -wi squashfs-tools fontconfig
mkdir -p pkg/usr/local/share/fonts
cp -R /mnt/sdc1/cyrillic pkg/usr/local/share/fonts
mkdir -p pkg/usr/tce.installed
echo -e "#!/bin/sh\n\nfc-cache /usr/local/share/fonts/cyrillic" > pkg/usr/tce.installed/cyrillic-fonts
mksquashfs pkg cyrillic-fonts.tcz
cp cyrillic-fonts.tcz /etc/sysconfig/tcedir/optional/
echo cyrillic-fonts.tcz >> /etc/sysconfig/tcedir/onboot.lst

Reboot and see if that worked.
« Last Edit: December 14, 2023, 09:46:07 AM by Rich »

Offline Sasha

  • Wiki Author
  • Newbie
  • *****
  • Posts: 10
Re: Fonts
« Reply #19 on: December 15, 2023, 08:05:31 AM »
Rich, thank you so much and God bless you! I've been trying to add a font to the system for half a year now! I tried everything, but now it works! It's good that I didn't sell my Lenovo s100. It could only run Windows XP, but it can't run Windows 7. Now it can be fully used. Of course, the file names remained in crocodiles, but the Cyrillic alphabet appeared in libreoffice. This is already huge progress! I owe you. If you need a program for the gym, write to me and I’ll compose it for you in English, for any purpose)
github.com/Kryukov-max/cyrillic
Just in case, I attached a link to the Cyrillic fonts, surely someone will need it!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11660
Re: Fonts
« Reply #20 on: December 15, 2023, 08:53:26 AM »
Hi Sasha
You are quite welcome. Thank you for confirming it worked.

One last thing. I should have included a dependency file:
Code: [Select]
echo "fontconfig.tcz" > /etc/sysconfig/tcedir/optional/cyrillic-fonts.tcz.depbecause your extension depends on  fontconfig.tcz.

You won't notice a difference because the  tce-load  command
added it to your  onboot.lst  file, so it's already being loaded.
You want that so your extension won't break if  fontconfig.tcz
is ever removed from your  onboot.lst  file.

Offline Sasha

  • Wiki Author
  • Newbie
  • *****
  • Posts: 10
Re: Fonts
« Reply #21 on: December 15, 2023, 09:07:00 AM »
Rich, thank you again! I'll definitely add
echo "fontconfig.tcz" > /etc/sysconfig/tcedir/optional/cyrillic-fonts.tcz.dep
Changes you recommended! I’ve already been using the site porusski.net for half a year, but it’s very inconvenient. Because You always need the Internet. And now everything is great!