diff --git a/docs/usermanual-ch03.xml b/docs/usermanual-ch03.xml new file mode 100644 index 000000000..66ec0a88c --- /dev/null +++ b/docs/usermanual-ch03.xml @@ -0,0 +1,77 @@ + + Buffers, language, script and direction + + 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. + + + Creating and destroying buffers + + As we saw in our initial example, a buffer is created and + initialized with hb_buffer_create(). This + produces a new, empty buffer object, instantiated with some + default values and ready to accept your Unicode strings. + + + 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 hb_buffer_destroy(): + + + hb_buffer_t *buffer = hb_buffer_create(); + ... + hb_buffer_destroy(buffer); + + + 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: + + +void somefunc(hb_buffer_t *buffer) { + buffer = hb_buffer_reference(buffer); + ... + + + And then decrease it once you're done with it: + + + hb_buffer_destroy(buffer); +} + + + To throw away all the data in your buffer and start from scratch, + call hb_buffer_reset(buffer). If you want to + throw away the string in the buffer but keep the options, you can + instead call hb_buffer_clear_contents(buffer). + + + + Adding text to the buffer + + 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 ) + + + + Setting buffer properties + + + + + What about the other scripts? + + + + + Customizing Unicode functions + + + + \ No newline at end of file diff --git a/docs/usermanual-ch04.xml b/docs/usermanual-ch04.xml new file mode 100644 index 000000000..c469147d5 --- /dev/null +++ b/docs/usermanual-ch04.xml @@ -0,0 +1,18 @@ + + Fonts and faces + + Using FreeType + + + + + Using Harfbuzz's native OpenType implementation + + + + + Using your own font functions + + + + \ No newline at end of file diff --git a/docs/usermanual-ch05.xml b/docs/usermanual-ch05.xml new file mode 100644 index 000000000..6f5017492 --- /dev/null +++ b/docs/usermanual-ch05.xml @@ -0,0 +1,13 @@ + + Shaping and shape plans + + OpenType features + + + + + Plans and caching + + + + \ No newline at end of file diff --git a/docs/usermanual-ch06.xml b/docs/usermanual-ch06.xml new file mode 100644 index 000000000..ca674c0c5 --- /dev/null +++ b/docs/usermanual-ch06.xml @@ -0,0 +1,8 @@ + + Glyph information + + Names and numbers + + + + \ No newline at end of file