TrueType
Материал из openSUSE.
Содержание |
Обзор
TrueType — шрифтовый стандарт, изначально созданный компанией Apple Computer в конце 1980-х годов в противовес стандарту Adobe's Type 1, который использовался в PostScript. Главное достоинство TrueType в предоставлении разработчикам возможности очень точно контролировать, как именно отображаются символы шрифта, вплоть до конкретных пикселей при определённом размере шрифта.
Проект Девида Тёрнера FreeType ставит своей целью реализацию стандарта TrueType (а также других шрифтовых стандартов). FreeType поставляется вместе с SUSE 10.0.
Особенности установки и рендеринга шрифтов
Многие пользователи ОС Linux недовольны рендерингом шрифтов под X11, но эта ситуация легко исправима. Обратите внимание, что предлагаемое решение использует патентованную технологию. Вам не нужна особая лицензия для частного использования, но может возникнуть необходимость в ней при распространении пакетов, использующих её. Смотрите патентную информацию в разделе внешних ссылок ниже.
Activating the TrueType bytecode interpreter for freetype2
SuSE 10.0 comes with the bytecode interpreter already compiled, so you only need to read this section if you're using some other version. If you are using SuSE 10.0 or greater, please skip ahead to Getting some TrueType fonts.
Download the freetype2 source package that matches your distribution. For SuSE 9.0, get it here. For SuSE 9.1, get it here. For SuSE 9.2, get it here. For SuSE 9.3, get it here. For any other distribution, get it from your vendor's server or from your installation media.
Install the source package you just downloaded:
rpm -i freetype2-$Version-$Release.src.rpm
Note that this does not require root privileges unless your system security is set to "paranoid", which is not the default. You must, of course, replace $Version and $Release with the values that match the source package you just downloaded.
This step will copy several files onto your system: freetype2.spec and the actual source code along with some patches. Unless you have set up a package building environment, freetype2.spec will be copied into /usr/src/packages/SPECS and all the other files will be copied into /usr/src/packages/SOURCES.
Open freetype2.spec in your favorite text editor and edit it. This might require higher privileges than you currently have. Copy the file elsewhere or change the permissions if necessary. You will find a section somewhere in the middle of freetype2.spec that looks like this:
# Remove the comment character in front ot the '%patch100' line # if you want to turn on the bytecode interpreter. # But first read http://www.freetype.org/freetype2/2.1.3-explained.html # I.3. Do I still need to enable the TrueType bytecode interpreter ? # # Short answer: No for most people !! # #%%patch100 -p 1 -b .bytecode
Edit it so that it looks like this:
# Remove the comment character in front ot the '%patch100' line # if you want to turn on the bytecode interpreter. # But first read http://www.freetype.org/freetype2/2.1.3-explained.html # I.3. Do I still need to enable the TrueType bytecode interpreter ? # # Short answer: No for most people !! # %patch100 -p 1 -b .bytecode
Note the difference at the beginning of the very last line in this section.
Change the Release tag of the package. This is not strictly necessary, but it might help you to organise your packages. If you would like to do so, find the following line at the beginning of freetype2.spec:
Release: #
"#" reflects the Release tag of the source package you downloaded before. Append ".bytecode" to it so that it looks like this:
Release: #.bytecode
Now let us turn the source package into binary packages. Change into the directory that contains your edited copy of freetype2.spec and execute the following:
rpmbuild -bb freetype2.spec
You might get error messages about missing build requirements at this step. If so, install the missing packages with yast, apt or whatever you prefer.
If everything goes well, you will get two binary packages after the build process has completed: freetype2-$Version-$Release.i586.rpm and freetype2-devel-$Version-$Release.i586.rpm. Unless you have set up a package building environment, they will be located in /usr/src/packages/RPMS/i586.
Install these packages as usual. freetype2 is definitely needed, freetype2-devel is needed in order to compile software that uses freetype2. Most graphical software does use freetype2, so let us install both packages. Change into the directory that contains these packages and execute the following:
rpm -Uvh freetype2-*
Note that this requires root privileges.
Congratulations, your TrueType bytecode interpreter for freetype2 is now activated! Log out from your Xsession and log in again in order for the new libraries to load.
Установка некоторых True Type шрифтов.
Большинство дистрибутивов Линукс уже содержат базовый набор True Type шрифтов, но чаще всего это далеко не лучшие шрифты из тех которые можно найти. Майкрософт бесплатно предоставила несколько качественных True Type шрифтов несколько лет назад. Чтобы установить их, запустите конфигуратор YaST и выбирете online update. Отметьте опцию, которая позволит вам загрузить и установить эти шрифты. Она не включена по умолчанию!
Эти шрифты распространяются свободно и не требуют наличия ни одной лицензии Майкрософт. Если у вас имеется лицензия Майкрософт, особенно на операционную систему Windows, вы можете использовать дополнительные шрифты. Они находятся в директории %WINDIR%\FONTS вашей лицензионной копии Windows, скопируйте их в директорию /usr/X11R6/lib/X11/fonts/local и выполните следующую команду:
SuSEconfig
Учтите что это действие требует root-привелегий. Это необходимо сделать чтобы X11 приняла новые шрифты.
Если у вас есть лицензия на операционную систему Windows, но сама система не установлена, вы можете загрузить шрифты от браузера Internet Explorer, который является частью операционной системы Windows. Самый ценный шрифт идущий в комплекте с браузером Internet Explorer это Tahoma. Скачайте его здесь. Для извлечения из архива самих True Type шрифтов выполните следущую команду:
cabextract --lowercase ielpkth.cab
Скопируйте tahoma.ttf и tahomabd.ttf в /usr/X11R6/lib/X11/fonts/local и запустите SuSEconfig.
Поздравляем, теперь ваши TrueType шрифты установлены в системе.
Подстройка параметров вашего рабочего стола
Установка шрифтов TrueType fonts никак не влияет на параметры вашего рабочего стола. Чтобы использовать преимущества ваших новых шрифтов fonts, откройте центр управления KDE или GNOME, выберите один из свежеустановленных шрифтов fonts. Лучше всего на мониторе выглядят шрифты Arial, Tahoma или Verdana установленные в размер 8 или 10. Если вы предпочитаете шрифты семейства serif, попробуйте шрифт Georgia.
Учтите что сглаживание больше не нужно если включен TrueType bytecode interpreter. Отключите сглаживание полностью или поставьте ограгничение на работу со шрифтами начиная с размеров 12 или 15.
Также вы можете настроить параметры вашего браузера. Для Mozilla Firefox откройте меню Правка (Edit) - Настройки (Preferences) - Основные (General) - Шрифты и Цвета (Fonts & Colours) и выберите там ваши новые шрифты. (В более новых версиях браузера (2.х) настройки шрифтов находятся на вкладке Содержимое а не Основные)

