[docs] s/Harfbuzz/HarfBuzz/g
This commit is contained in:
parent
87d74605f5
commit
a0ad0d5bb8
|
@ -60,7 +60,7 @@
|
|||
</partinfo>
|
||||
<title>Reference manual</title>
|
||||
<chapter>
|
||||
<title>Harfbuzz API</title>
|
||||
<title>HarfBuzz API</title>
|
||||
<xi:include href="xml/hb.xml"/>
|
||||
<xi:include href="xml/hb-common.xml"/>
|
||||
<xi:include href="xml/hb-unicode.xml"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<chapter id="buffers-language-script-and-direction">
|
||||
<title>Buffers, language, script and direction</title>
|
||||
<para>
|
||||
The input to Harfbuzz is a series of Unicode characters, stored in a
|
||||
The input to HarfBuzz is a series of Unicode characters, stored in a
|
||||
buffer. In this chapter, we'll look at how to set up a buffer with
|
||||
the text that we want and then customize the properties of the
|
||||
buffer.
|
||||
|
@ -15,7 +15,7 @@
|
|||
default values and ready to accept your Unicode strings.
|
||||
</para>
|
||||
<para>
|
||||
Harfbuzz manages the memory of objects that it creates (such as
|
||||
HarfBuzz manages the memory of objects that it creates (such as
|
||||
buffers), so you don't have to. When you have finished working on
|
||||
a buffer, you can call <literal>hb_buffer_destroy()</literal>:
|
||||
</para>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<para>
|
||||
This will destroy the object and free its associated memory -
|
||||
unless some other part of the program holds a reference to this
|
||||
buffer. If you acquire a Harfbuzz buffer from another subsystem
|
||||
buffer. If you acquire a HarfBuzz buffer from another subsystem
|
||||
and want to ensure that it is not garbage collected by someone
|
||||
else destroying it, you should increase its reference count:
|
||||
</para>
|
||||
|
@ -53,8 +53,8 @@ void somefunc(hb_buffer_t *buffer) {
|
|||
<section id="adding-text-to-the-buffer">
|
||||
<title>Adding text to the buffer</title>
|
||||
<para>
|
||||
Now we have a brand new Harfbuzz buffer. Let's start filling it
|
||||
with text! From Harfbuzz's perspective, a buffer is just a stream
|
||||
Now we have a brand new HarfBuzz buffer. Let's start filling it
|
||||
with text! From HarfBuzz's perspective, a buffer is just a stream
|
||||
of Unicode codepoints, but your input string is probably in one of
|
||||
the standard Unicode character encodings (UTF-8, UTF-16, UTF-32)
|
||||
</para>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</para>
|
||||
</section>
|
||||
<section id="using-harfbuzzs-native-opentype-implementation">
|
||||
<title>Using Harfbuzz's native OpenType implementation</title>
|
||||
<title>Using HarfBuzz's native OpenType implementation</title>
|
||||
<para>
|
||||
</para>
|
||||
</section>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<chapter id="hello-harfbuzz">
|
||||
<title>Hello, Harfbuzz</title>
|
||||
<title>Hello, HarfBuzz</title>
|
||||
<para>
|
||||
Here's the simplest Harfbuzz that can possibly work. We will improve
|
||||
Here's the simplest HarfBuzz that can possibly work. We will improve
|
||||
it later.
|
||||
</para>
|
||||
<orderedlist numeration="arabic">
|
||||
|
@ -91,23 +91,23 @@
|
|||
hb_font_destroy(hb_ft_font);
|
||||
</programlisting>
|
||||
<section id="what-harfbuzz-doesnt-do">
|
||||
<title>What Harfbuzz doesn't do</title>
|
||||
<title>What HarfBuzz doesn't do</title>
|
||||
<para>
|
||||
The code above will take a UTF8 string, shape it, and give you the
|
||||
information required to lay it out correctly on a single
|
||||
horizontal (or vertical) line using the font provided. That is the
|
||||
extent of Harfbuzz's responsibility.
|
||||
extent of HarfBuzz's responsibility.
|
||||
</para>
|
||||
<para>
|
||||
If you are implementing a text layout engine you may have other
|
||||
responsibilities, that Harfbuzz will not help you with:
|
||||
responsibilities, that HarfBuzz will not help you with:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Harfbuzz won't help you with bidirectionality. If you want to
|
||||
HarfBuzz won't help you with bidirectionality. If you want to
|
||||
lay out text with mixed Hebrew and English, you will need to
|
||||
ensure that the buffer provided to Harfbuzz has those
|
||||
ensure that the buffer provided to HarfBuzz has those
|
||||
characters in the correct layout order. This will be different
|
||||
from the logical order in which the Unicode text is stored. In
|
||||
other words, the user will hit the keys in the following
|
||||
|
@ -127,30 +127,30 @@ ABC אבג DEF
|
|||
("bidi" is short for bidirectional), and there's an
|
||||
algorithm as an annex to the Unicode Standard which tells you how
|
||||
to reorder a string from logical order into presentation order.
|
||||
Before sending your string to Harfbuzz, you may need to apply the
|
||||
Before sending your string to HarfBuzz, you may need to apply the
|
||||
bidi algorithm to it. Libraries such as ICU and fribidi can do
|
||||
this for you.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Harfbuzz won't help you with text that contains different font
|
||||
HarfBuzz won't help you with text that contains different font
|
||||
properties. For instance, if you have the string "a
|
||||
<emphasis>huge</emphasis> breakfast", and you expect
|
||||
"huge" to be italic, you will need to send three
|
||||
strings to Harfbuzz: <literal>a</literal>, in your Roman font;
|
||||
strings to HarfBuzz: <literal>a</literal>, in your Roman font;
|
||||
<literal>huge</literal> using your italic font; and
|
||||
<literal>breakfast</literal> using your Roman font again.
|
||||
Similarly if you change font, font size, script, language or
|
||||
direction within your string, you will need to shape each run
|
||||
independently and then output them independently. Harfbuzz
|
||||
independently and then output them independently. HarfBuzz
|
||||
expects to shape a run of characters sharing the same
|
||||
properties.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Harfbuzz won't help you with line breaking, hyphenation or
|
||||
HarfBuzz won't help you with line breaking, hyphenation or
|
||||
justification. As mentioned above, it lays out the string
|
||||
along a <emphasis>single line</emphasis> of, notionally,
|
||||
infinite length. If you want to find out where the potential
|
||||
|
@ -158,12 +158,12 @@ ABC אבג DEF
|
|||
could use the ICU library's break iterator functions.
|
||||
</para>
|
||||
<para>
|
||||
Harfbuzz can tell you how wide a shaped piece of text is, which is
|
||||
HarfBuzz can tell you how wide a shaped piece of text is, which is
|
||||
useful input to a justification algorithm, but it knows nothing
|
||||
about paragraphs, lines or line lengths. Nor will it adjust the
|
||||
space between words to fit them proportionally into a line. If you
|
||||
want to layout text in paragraphs, you will probably want to send
|
||||
each word of your text to Harfbuzz to determine its shaped width
|
||||
each word of your text to HarfBuzz to determine its shaped width
|
||||
after glyph substitutions, then work out how many words will fit
|
||||
on a line, and then finally output each word of the line separated
|
||||
by a space of the correct size to fully justify the paragraph.
|
||||
|
@ -171,12 +171,12 @@ ABC אבג DEF
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
As a layout engine implementor, Harfbuzz will help you with the
|
||||
As a layout engine implementor, HarfBuzz will help you with the
|
||||
interface between your text and your font, and that's something
|
||||
that you'll need - what you then do with the glyphs that your font
|
||||
returns is up to you. The example we saw above enough to get us
|
||||
started using Harfbuzz. Now we are going to use the remainder of
|
||||
Harfbuzz's API to refine that example and improve our text shaping
|
||||
started using HarfBuzz. Now we are going to use the remainder of
|
||||
HarfBuzz's API to refine that example and improve our text shaping
|
||||
capabilities.
|
||||
</para>
|
||||
</section>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<chapter id="install-harfbuzz">
|
||||
<title>Install Harfbuzz</title>
|
||||
<title>Install HarfBuzz</title>
|
||||
<section id="download">
|
||||
<title id="download.title">Download</title>
|
||||
<para>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<chapter id="what-is-harfbuzz">
|
||||
<title>What is Harfbuzz?</title>
|
||||
<title>What is HarfBuzz?</title>
|
||||
<para>
|
||||
Harfbuzz is a <emphasis>text shaping engine</emphasis>. It solves
|
||||
HarfBuzz is a <emphasis>text shaping engine</emphasis>. It solves
|
||||
the problem of selecting and positioning glyphs from a font given a
|
||||
Unicode string.
|
||||
</para>
|
||||
|
@ -9,17 +9,17 @@
|
|||
<title>Why do I need it?</title>
|
||||
<para>
|
||||
Text shaping is an integral part of preparing text for display. It
|
||||
is a fairly low level operation; Harfbuzz is used directly by
|
||||
is a fairly low level operation; HarfBuzz is used directly by
|
||||
graphic rendering libraries such as Pango, and the layout engines
|
||||
in Firefox, LibreOffice and Chromium. Unless you are
|
||||
<emphasis>writing</emphasis> one of these layout engines yourself,
|
||||
you will probably not need to use Harfbuzz - normally higher level
|
||||
you will probably not need to use HarfBuzz - normally higher level
|
||||
libraries will turn text into glyphs for you.
|
||||
</para>
|
||||
<para>
|
||||
However, if you <emphasis>are</emphasis> writing a layout engine
|
||||
or graphics library yourself, you will need to perform text
|
||||
shaping, and this is where Harfbuzz can help you. Here are some
|
||||
shaping, and this is where HarfBuzz can help you. Here are some
|
||||
reasons why you need it:
|
||||
</para>
|
||||
<itemizedlist>
|
||||
|
@ -95,20 +95,20 @@
|
|||
<para>
|
||||
If this is something that you need to do, then you need a text
|
||||
shaping engine: you could use Uniscribe if you are using Windows;
|
||||
you could use CoreText on OS X; or you could use Harfbuzz. In the
|
||||
you could use CoreText on OS X; or you could use HarfBuzz. In the
|
||||
rest of this manual, we are going to assume that you are the
|
||||
implementor of a text layout engine.
|
||||
</para>
|
||||
</section>
|
||||
<section id="why-is-it-called-harfbuzz">
|
||||
<title>Why is it called Harfbuzz?</title>
|
||||
<title>Why is it called HarfBuzz?</title>
|
||||
<para>
|
||||
Harfbuzz began its life as text shaping code within the FreeType
|
||||
HarfBuzz began its life as text shaping code within the FreeType
|
||||
project, (and you will see references to the FreeType authors
|
||||
within the source code copyright declarations) but was then
|
||||
abstracted out to its own project. This project is maintained by
|
||||
Behdad Esfahbod, and named Harfbuzz. Originally, it was a shaping
|
||||
engine for OpenType fonts - "Harfbuzz" is the Persian
|
||||
Behdad Esfahbod, and named HarfBuzz. Originally, it was a shaping
|
||||
engine for OpenType fonts - "HarfBuzz" is the Persian
|
||||
for "open type".
|
||||
</para>
|
||||
</section>
|
||||
|
|
Loading…
Reference in New Issue