Difference between revisions of "Improve Font Rendering/ru"
Views
Actions
Namespaces
Variants
Tools
(Created page with " {{UserCmd|command=sudo nano /etc/fonts/local.conf}}") Tags: Mobile web edit Mobile edit |
(Created page with "Вставьте в него следующее содержимое:") Tags: Mobile web edit Mobile edit |
||
Line 11: | Line 11: | ||
{{UserCmd|command=sudo nano /etc/fonts/local.conf}} | {{UserCmd|command=sudo nano /etc/fonts/local.conf}} | ||
Вставьте в него следующее содержимое: | |||
<?xml version="1.0"?> | <?xml version="1.0"?> | ||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | ||
Line 37: | Line 34: | ||
</match> | </match> | ||
</fontconfig> | </fontconfig> | ||
Revision as of 06:33, 31 January 2023
Как улучшить рендеринг с установленными шрифтами
Для оптимального отображения шрифтов может потребоваться небольшая настройка. Выполните следующие шаги, показанные ниже.
1. Создайте глобальный файл настройки fontconfig /etc/fonts/local.conf '
Вставьте в него следующее содержимое:
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <edit name="antialias" mode="assign"> <bool>true</bool> </edit> <edit name="hinting" mode="assign"> <bool>true</bool> </edit> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> </match> </fontconfig>
After that save the file.
2. Create backup of ~/.Xresources file:
If the .Xresources file has not been already created and you get the error
"cp: cannot stat ‘~/.Xresources’: No such file or directory", then skip to step No. 3.
3. Open/Create ~/.Xresources file in text editor:
If the following is not already present, paste at the end of the file or edit existing values:
Xft.antialias: 1 Xft.hinting: 1 Xft.rgba: rgb Xft.hintstyle: hintslight Xft.lcdfilter: lcddefault
Save changes to the file.
4. Run the following command in terminal:
5. Make sure that Anti aliasing is On, Hinting is set to Slight and RGBA (subpixel) order is set to rgb in System Settings (Appearance).
6. Create symbolic links with some available presets from /usr/share/fontconfig/conf.avail/ to /etc/fonts/conf.d/
7. Set preferred serif, sans-serif and monospace fonts (optional)
Create local fontconfig folder and setting file
Paste the following content in the file
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <alias> <family>serif</family> <prefer> <family>Liberation Serif</family> </prefer> </alias> <alias> <family>sans-serif</family> <prefer> <family>Liberation Sans</family> </prefer> </alias> <alias> <family>sans</family> <prefer> <family>Liberation Sans</family> </prefer> </alias> <alias> <family>monospace</family> <prefer> <family>Liberation Mono</family> </prefer> </alias> <alias> <family>mono</family> <prefer> <family>Liberation Mono</family> </prefer> </alias> </fontconfig>
8. Finally enable freetype2 infinality mode and reboot your computer.
add line to end of freetype2 config file and then rebuild fontconfig cache