[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Freetype] Font files and vertical text
From: |
Lawrence D'Oliveiro |
Subject: |
Re: [Freetype] Font files and vertical text |
Date: |
Mon, 17 May 2021 02:48:19 +1200 |
OK, how about this as a starting point:
Q: How do I render a line of text in FreeType?
A: FreeType is a very low-level rendering engine. All it knows how to
do is render individual glyphs and return metrics for them.
Arranging glyphs into words and lines is best left to a more complete
2D graphics rendering library, like Cairo
<https://www.cairographics.org/>. Cairo also does very basic
translation of Unicode character codes to glyphs; for a more general
solution, add HarfBuzz
<https://www.freedesktop.org/wiki/Software/HarfBuzz/>, which implements
the full OpenType rules for glyph substitution and placement (Cairo
still handles the actual text drawing). To deal with right-to-left
(Arabic, Hebrew) text layout, you will also need FriBidi
<https://github.com/fribidi/fribidi>, which handles the details of the
Unicode bidirectional layout algorithm.
And finally, to cope with additional niceties like dealing with
writing-system-specific rules for word breaks and line breaks, you
might like to look at ICU <http://www.icu-project.org>, which includes
a whole range of internationalization and localization facilities.
[Is it worth mentioning Fontconfig
<https://www.freedesktop.org/wiki/Software/fontconfig/> as well, do you
think? As a solution for font matching?]
- Re: how update the website for the complex layout, (continued)
- Message not available
- Message not available
- Re: how update the website for the complex layout, suzuki toshiya, 2021/05/16
- Re: how update the website for the complex layout, Lawrence D'Oliveiro, 2021/05/16
- Re: how update the website for the complex layout, Werner LEMBERG, 2021/05/19
- Re: how update the website for the complex layout, Lawrence D'Oliveiro, 2021/05/19
- Re: how update the website for the complex layout, Werner LEMBERG, 2021/05/19
- Re: how update the website for the complex layout, Eric Muller, 2021/05/19
- Re: how update the website for the complex layout, Harold Hallikainen, 2021/05/19
- Re: how update the website for the complex layout, Lawrence D'Oliveiro, 2021/05/19
- Message not available
- Re: how update the website for the complex layout, suzuki toshiya, 2021/05/19
- Re: how update the website for the complex layout, Werner LEMBERG, 2021/05/19
- Re: [Freetype] Font files and vertical text,
Lawrence D'Oliveiro <=
- Re: [Freetype] Font files and vertical text, Werner LEMBERG, 2021/05/19
Fwd: [Freetype] Font files and vertical text, suzuki toshiya, 2021/05/15