summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Cozens <simon@simon-cozens.org>2015-08-29 08:21:18 +0100
committerSimon Cozens <simon@simon-cozens.org>2015-08-29 08:21:18 +0100
commit5470e744dd264c2dc33437a68d20bcf7c5ffb905 (patch)
treef290158b8722b73d9215d8ef22f8c413d507f188
parentf0807654da160bd7ceb9aff5b8338ec0b643171c (diff)
downloadharfbuzz-5470e744dd264c2dc33437a68d20bcf7c5ffb905.tar.gz
Current state and skeleton outline
-rw-r--r--docs/usermanual-ch03.xml77
-rw-r--r--docs/usermanual-ch04.xml18
-rw-r--r--docs/usermanual-ch05.xml13
-rw-r--r--docs/usermanual-ch06.xml8
4 files changed, 116 insertions, 0 deletions
diff --git a/docs/usermanual-ch03.xml b/docs/usermanual-ch03.xml
new file mode 100644
index 00000000..66ec0a88
--- /dev/null
+++ b/docs/usermanual-ch03.xml
@@ -0,0 +1,77 @@
+<sect1 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
+ 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.
+ </para>
+ <sect2 id="creating-and-destroying-buffers">
+ <title>Creating and destroying buffers</title>
+ <para>
+ As we saw in our initial example, a buffer is created and
+ initialized with <literal>hb_buffer_create()</literal>. This
+ produces a new, empty buffer object, instantiated with some
+ default values and ready to accept your Unicode strings.
+ </para>
+ <para>
+ 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>
+ <programlisting language="C">
+ hb_buffer_t *buffer = hb_buffer_create();
+ ...
+ hb_buffer_destroy(buffer);
+</programlisting>
+ <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
+ and want to ensure that it is not garbage collected by someone
+ else destroying it, you should increase its reference count:
+ </para>
+ <programlisting language="C">
+void somefunc(hb_buffer_t *buffer) {
+ buffer = hb_buffer_reference(buffer);
+ ...
+</programlisting>
+ <para>
+ And then decrease it once you're done with it:
+ </para>
+ <programlisting language="C">
+ hb_buffer_destroy(buffer);
+}
+</programlisting>
+ <para>
+ To throw away all the data in your buffer and start from scratch,
+ call <literal>hb_buffer_reset(buffer)</literal>. If you want to
+ throw away the string in the buffer but keep the options, you can
+ instead call <literal>hb_buffer_clear_contents(buffer)</literal>.
+ </para>
+ </sect2>
+ <sect2 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
+ of Unicode codepoints, but your input string is probably in one of
+ the standard Unicode character encodings (UTF-8, UTF-16, UTF-3 )
+ </para>
+ </sect2>
+ <sect2 id="setting-buffer-properties">
+ <title>Setting buffer properties</title>
+ <para>
+ </para>
+ </sect2>
+ <sect2 id="what-about-the-other-scripts">
+ <title>What about the other scripts?</title>
+ <para>
+ </para>
+ </sect2>
+ <sect2 id="customizing-unicode-functions">
+ <title>Customizing Unicode functions</title>
+ <para>
+ </para>
+ </sect2>
+</sect1> \ No newline at end of file
diff --git a/docs/usermanual-ch04.xml b/docs/usermanual-ch04.xml
new file mode 100644
index 00000000..c469147d
--- /dev/null
+++ b/docs/usermanual-ch04.xml
@@ -0,0 +1,18 @@
+<sect1 id="fonts-and-faces">
+ <title>Fonts and faces</title>
+ <sect2 id="using-freetype">
+ <title>Using FreeType</title>
+ <para>
+ </para>
+ </sect2>
+ <sect2 id="using-harfbuzzs-native-opentype-implementation">
+ <title>Using Harfbuzz's native OpenType implementation</title>
+ <para>
+ </para>
+ </sect2>
+ <sect2 id="using-your-own-font-functions">
+ <title>Using your own font functions</title>
+ <para>
+ </para>
+ </sect2>
+</sect1> \ No newline at end of file
diff --git a/docs/usermanual-ch05.xml b/docs/usermanual-ch05.xml
new file mode 100644
index 00000000..6f501749
--- /dev/null
+++ b/docs/usermanual-ch05.xml
@@ -0,0 +1,13 @@
+<sect1 id="shaping-and-shape-plans">
+ <title>Shaping and shape plans</title>
+ <sect2 id="opentype-features">
+ <title>OpenType features</title>
+ <para>
+ </para>
+ </sect2>
+ <sect2 id="plans-and-caching">
+ <title>Plans and caching</title>
+ <para>
+ </para>
+ </sect2>
+</sect1> \ No newline at end of file
diff --git a/docs/usermanual-ch06.xml b/docs/usermanual-ch06.xml
new file mode 100644
index 00000000..ca674c0c
--- /dev/null
+++ b/docs/usermanual-ch06.xml
@@ -0,0 +1,8 @@
+<sect1 id="glyph-information">
+ <title>Glyph information</title>
+ <sect2 id="names-and-numbers">
+ <title>Names and numbers</title>
+ <para>
+ </para>
+ </sect2>
+</sect1> \ No newline at end of file