Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
a0ad0d5b
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a0ad0d5b
编写于
11月 20, 2017
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[docs] s/Harfbuzz/HarfBuzz/g
上级
87d74605
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
35 addition
and
35 deletion
+35
-35
docs/harfbuzz-docs.xml
docs/harfbuzz-docs.xml
+1
-1
docs/usermanual-buffers-language-script-and-direction.xml
docs/usermanual-buffers-language-script-and-direction.xml
+5
-5
docs/usermanual-fonts-and-faces.xml
docs/usermanual-fonts-and-faces.xml
+1
-1
docs/usermanual-hello-harfbuzz.xml
docs/usermanual-hello-harfbuzz.xml
+17
-17
docs/usermanual-install-harfbuzz.xml
docs/usermanual-install-harfbuzz.xml
+1
-1
docs/usermanual-what-is-harfbuzz.xml
docs/usermanual-what-is-harfbuzz.xml
+10
-10
未找到文件。
docs/harfbuzz-docs.xml
浏览文件 @
a0ad0d5b
...
...
@@ -60,7 +60,7 @@
</partinfo>
<title>
Reference manual
</title>
<chapter>
<title>
Harf
b
uzz API
</title>
<title>
Harf
B
uzz API
</title>
<xi:include
href=
"xml/hb.xml"
/>
<xi:include
href=
"xml/hb-common.xml"
/>
<xi:include
href=
"xml/hb-unicode.xml"
/>
...
...
docs/usermanual-buffers-language-script-and-direction.xml
浏览文件 @
a0ad0d5b
<chapter
id=
"buffers-language-script-and-direction"
>
<title>
Buffers, language, script and direction
</title>
<para>
The input to Harf
b
uzz is a series of Unicode characters, stored in a
The input to Harf
B
uzz 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>
Harf
b
uzz manages the memory of objects that it creates (such as
Harf
B
uzz 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 Harf
b
uzz buffer from another subsystem
buffer. If you acquire a Harf
B
uzz 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 Harf
b
uzz buffer. Let's start filling it
with text! From Harf
b
uzz's perspective, a buffer is just a stream
Now we have a brand new Harf
B
uzz buffer. Let's start filling it
with text! From Harf
B
uzz'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>
...
...
docs/usermanual-fonts-and-faces.xml
浏览文件 @
a0ad0d5b
...
...
@@ -6,7 +6,7 @@
</para>
</section>
<section
id=
"using-harfbuzzs-native-opentype-implementation"
>
<title>
Using Harf
b
uzz's native OpenType implementation
</title>
<title>
Using Harf
B
uzz's native OpenType implementation
</title>
<para>
</para>
</section>
...
...
docs/usermanual-hello-harfbuzz.xml
浏览文件 @
a0ad0d5b
<chapter
id=
"hello-harfbuzz"
>
<title>
Hello, Harf
b
uzz
</title>
<title>
Hello, Harf
B
uzz
</title>
<para>
Here's the simplest Harf
b
uzz that can possibly work. We will improve
Here's the simplest Harf
B
uzz 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 Harf
b
uzz doesn't do
</title>
<title>
What Harf
B
uzz 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 Harf
b
uzz's responsibility.
extent of Harf
B
uzz's responsibility.
</para>
<para>
If you are implementing a text layout engine you may have other
responsibilities, that Harf
b
uzz will not help you with:
responsibilities, that Harf
B
uzz will not help you with:
</para>
<itemizedlist>
<listitem>
<para>
Harf
b
uzz won't help you with bidirectionality. If you want to
Harf
B
uzz 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 Harf
b
uzz has those
ensure that the buffer provided to Harf
B
uzz 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 Harf
b
uzz, you may need to apply the
Before sending your string to Harf
B
uzz, 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>
Harf
b
uzz won't help you with text that contains different font
Harf
B
uzz 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 Harf
b
uzz:
<literal>
a
</literal>
, in your Roman font;
strings to Harf
B
uzz:
<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. Harf
b
uzz
independently and then output them independently. Harf
B
uzz
expects to shape a run of characters sharing the same
properties.
</para>
</listitem>
<listitem>
<para>
Harf
b
uzz won't help you with line breaking, hyphenation or
Harf
B
uzz 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>
Harf
b
uzz can tell you how wide a shaped piece of text is, which is
Harf
B
uzz 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 Harf
b
uzz to determine its shaped width
each word of your text to Harf
B
uzz 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, Harf
b
uzz will help you with the
As a layout engine implementor, Harf
B
uzz 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 Harf
b
uzz. Now we are going to use the remainder of
Harf
b
uzz's API to refine that example and improve our text shaping
started using Harf
B
uzz. Now we are going to use the remainder of
Harf
B
uzz's API to refine that example and improve our text shaping
capabilities.
</para>
</section>
...
...
docs/usermanual-install-harfbuzz.xml
浏览文件 @
a0ad0d5b
<chapter
id=
"install-harfbuzz"
>
<title>
Install Harf
b
uzz
</title>
<title>
Install Harf
B
uzz
</title>
<section
id=
"download"
>
<title
id=
"download.title"
>
Download
</title>
<para>
...
...
docs/usermanual-what-is-harfbuzz.xml
浏览文件 @
a0ad0d5b
<chapter
id=
"what-is-harfbuzz"
>
<title>
What is Harf
b
uzz?
</title>
<title>
What is Harf
B
uzz?
</title>
<para>
Harf
b
uzz is a
<emphasis>
text shaping engine
</emphasis>
. It solves
Harf
B
uzz 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; Harf
b
uzz is used directly by
is a fairly low level operation; Harf
B
uzz 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 Harf
b
uzz - normally higher level
you will probably not need to use Harf
B
uzz - 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 Harf
b
uzz can help you. Here are some
shaping, and this is where Harf
B
uzz 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 Harf
b
uzz. In the
you could use CoreText on OS X; or you could use Harf
B
uzz. 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 Harf
b
uzz?
</title>
<title>
Why is it called Harf
B
uzz?
</title>
<para>
Harf
b
uzz began its life as text shaping code within the FreeType
Harf
B
uzz 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 Harf
b
uzz. Originally, it was a shaping
engine for OpenType fonts -
"
Harf
b
uzz
"
is the Persian
Behdad Esfahbod, and named Harf
B
uzz. Originally, it was a shaping
engine for OpenType fonts -
"
Harf
B
uzz
"
is the Persian
for
"
open type
"
.
</para>
</section>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录