1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Objects in HarfBuzz: HarfBuzz Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="HarfBuzz Manual">
8 <link rel="up" href="object-model.html" title="The HarfBuzz object model">
9 <link rel="prev" href="object-model.html" title="The HarfBuzz object model">
10 <link rel="next" href="object-model-lifecycle.html" title="Object lifecycle management">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts"></td>
17 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
18 <td><a accesskey="u" href="object-model.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
19 <td><a accesskey="p" href="object-model.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
20 <td><a accesskey="n" href="object-model-lifecycle.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
23 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
24 <a name="object-model-object-types"></a>Objects in HarfBuzz</h2></div></div></div>
26 <span class="emphasis"><em>Object types:</em></span> Opaque struct types are used
27 for what HarfBuzz loosely calls "objects." This doesn’t have
28 much to do with the terminology from object-oriented programming
29 (OOP), although some of the concepts are similar.
32 In HarfBuzz, all object types provide certain
33 lifecycle-management APIs. Objects are reference-counted, and
34 constructed with various <code class="function">create()</code> methods, referenced via
35 <code class="function">reference()</code> and dereferenced using
36 <code class="function">destroy()</code>.
40 the <code class="literal">hb_buffer_t</code> object has
41 <code class="function">hb_buffer_create()</code> as its constructor,
42 <code class="function">hb_buffer_reference()</code> to reference, and
43 <code class="function">hb_buffer_destroy()</code> to dereference.
46 After construction, each object's properties are accessible only
47 through the setter and getter functions described in the API
51 Key object types provided by HarfBuzz include:
53 <div class="itemizedlist"><ul class="itemizedlist compact" style="list-style-type: disc; ">
54 <li class="listitem"><p>
55 <span class="emphasis"><em>blobs</em></span>, which act as low-level wrappers around binary
56 data. Blobs are typically used to hold the contents of a
59 <li class="listitem"><p>
60 <span class="emphasis"><em>faces</em></span>, which represent typefaces from a
61 font file, but without specific parameters (such as size) set.
63 <li class="listitem"><p>
64 <span class="emphasis"><em>fonts</em></span>, which represent instances of a
65 face with all of their parameters specified.
67 <li class="listitem"><p>
68 <span class="emphasis"><em>buffers</em></span>, which hold Unicode code points
69 for characters (before shaping) and the shaped glyph output
72 <li class="listitem"><p>
73 <span class="emphasis"><em>shape plans</em></span>, which store the settings
74 that HarfBuzz will use when shaping a particular text
75 segment. Shape plans are not generally used by client
76 programs directly, but as we will see in a later chapter,
77 they are still valuable to understand.
82 <hr>Generated by GTK-Doc V1.29</div>