Как стать автором
Обновить

Незаметный релиз FreeType 2.5 — прорыв в рендеринге шрифтов

Время на прочтение3 мин
Количество просмотров25K
image Проект FreeType — это библиотека, которая используется для растеризации шрифтов и операций над ними. В частности используется для отображения шрифтов в X11.

Долгое время в FreeType была по умолчанию отключена поддержка правильного хинтинга TrueType-файлов через встроенный байт-код шрифта, поскольку данная технология попадала под патенты Apple. Для обхода патентов, сборки FreeType по умолчанию использовали незапатентованный алгоритм авто-хинтинга. В мае 2010 года срок патентов истек, и начиная с версии 2.4.0, FreeType по умолчанию использует правильный хинтинг через интерпретатор байт-кода шрифта.

Дальше — больше. В конце 2012 был объявлен сбор денег на развитие проекта. А в июне 2013 фандрайзинговая кампания успешно завершилась, принеся проекту 20 тысяч долларов. Тем временем компании Adobe (которая раньше мешала техническому прогрессу своими патентами!) и Google совместно внесли ряд улучшений, которые, в частности, значительно улучшили работу приснопамятного хинтинга на всех поддерживаемых проектом платформах. Вместе с рядом других улучшений это привело к выпуску новой версии — FreeType 2.5.

Особенности релиза
CHANGES BETWEEN 2.4.12 and 2.5

I. IMPORTANT BUG FIXES

— The cache manager function `FTC_Manager_Reset' didn't flush the
cache.

II. IMPORTANT CHANGES

— Behdad Esfahbod (on behalf of Google) contributed support for
color embedded bitmaps (eg. color emoji).

A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification

color-emoji.googlecode.com/git/specification/v1.html

which defines two new SFNT tables, `CBDT' and `CBLC' (named and
modeled after `EBDT' and `EBLC', respectively). The color
bitmaps are stored in the new FT_PIXEL_MODE_BGRA format to
represent BGRA pre-multiplied sRGB images. If PNG support is
available, PNG color images as defined in the same proposed
specification are supported also.

Note that color bitmaps are converted to grayscale if client
didn't ask for color.

— As announced in the previous release, the old FreeType CFF
engine is now disabled by default. It can be conditionally
compiled by defining the configuration macro
CFF_CONFIG_OPTION_OLD_ENGINE.

— As announced in the previous release, all code related to macro
FT_CONFIG_OPTION_OLD_INTERNALS has been removed, thus becoming
obsolete.

III. MISCELLANEOUS

— The property API (`FT_Property_Get' and `FT_Property_Set') is
now declared as stable.

The exception, however, are the experimental auto-hinter
properties `glyph-to-script-map' and `fallback-script' which are
subject to change in a forthcoming release.

— `ftview' has been updated to support color embedded bitmaps; it
can be toggled on and off with key `c'. The small cache toggle
is now key `K'.

— It is now possible to control the version of the TrueType
hinting engine using the new `interpreter-version' property of
the `truetype' module: Versions 35 and 38 (the default) are
supported, which roughly corresponds to disable and enable
subpixel hinting support, respectively.

In both `ftview' and `ftdiff', switching between the two
versions can be done with key `H'. In the `ftbench' demo
program, command line option `-H' has been extended to activate
the non-default interpreter version.

— The `ttdebug' program has been further improved. In particular,
it accepts a new command line option `-H' to select the hinting
engine.

— Another round of TrueType subpixel hinting fixes.

— The `apinames' tool can now create an import file for NetWare.

— 64bit compilation of the new CFF engine was buggy.

— Some fixes to improve robustness in memory-tight situations.

1.
image

2.
image
FreeType Using the Old CFF Rasterizer with Light Auto Hint (most common setting)

image
FreeType Using the Adobe CFF Rasterizer (now the default CFF rasterizer)

Как ни странно, но больше всех в данном случае выигрывает ReactOS, соврешенно бесплатно получив продвинутый шрифтовой движок.
Теги:
Хабы:
Если эта публикация вас вдохновила и вы хотите поддержать автора — не стесняйтесь нажать на кнопку
+54
Комментарии22

Публикации

Изменить настройки темы

Истории

Ближайшие события