4349 |
Serge |
1 |
|
|
|
2 |
"http://www.w3.org/TR/html4/loose.dtd"> |
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
FreeType-2.5.0 API Reference |
|
|
7 |
|
|
|
8 |
body { font-family: Verdana, Geneva, Arial, Helvetica, serif; |
|
|
9 |
color: #000000; |
|
|
10 |
background: #FFFFFF; } |
|
|
11 |
|
|
|
12 |
p { text-align: justify; } |
|
|
13 |
h1 { text-align: center; } |
|
|
14 |
li { text-align: justify; } |
|
|
15 |
td { padding: 0 0.5em 0 0.5em; } |
|
|
16 |
td.left { padding: 0 0.5em 0 0.5em; |
|
|
17 |
text-align: left; } |
|
|
18 |
|
|
|
19 |
a:link { color: #0000EF; } |
|
|
20 |
a:visited { color: #51188E; } |
|
|
21 |
a:hover { color: #FF0000; } |
|
|
22 |
|
|
|
23 |
span.keyword { font-family: monospace; |
|
|
24 |
text-align: left; |
|
|
25 |
white-space: pre; |
|
|
26 |
color: darkblue; } |
|
|
27 |
|
|
|
28 |
pre.colored { color: blue; } |
|
|
29 |
|
|
|
30 |
ul.empty { list-style-type: none; } |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
38 |
FreeType-2.5.0 API Reference
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
Cache Sub-System |
|
|
42 |
|
|
|
43 |
Synopsis
|
|
|
44 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
This section describes the FreeType 2 cache sub-system, which is used to limit the number of concurrently opened FT_Face and FT_Size objects, as well as caching information like character maps and glyph images while limiting their maximum memory usage.
|
|
|
63 |
Note that all types and functions begin with the ‘FTC_’ prefix.
|
|
|
64 |
The cache is highly portable and thus doesn't know anything about the fonts installed on your system, or how to access them. This implies the following scheme:
|
|
|
65 |
First, available or installed font faces are uniquely identified by FTC_FaceID values, provided to the cache by the client. Note that the cache only stores and compares these values, and doesn't try to interpret them in any way.
|
|
|
66 |
Second, the cache calls, only when needed, a client-provided function to convert an FTC_FaceID into a new FT_Face object. The latter is then completely managed by the cache, including its termination through FT_Done_Face. To monitor termination of face objects, the finalizer callback in the ‘generic’ field of the FT_Face object can be used, which might also be used to store the FTC_FaceID of the face.
|
|
|
67 |
Clients are free to map face IDs to anything else. The most simple usage is to associate them to a (pathname,face_index) pair that is used to call FT_New_Face. However, more complex schemes are also possible.
|
|
|
68 |
Note that for the cache to work correctly, the face ID values must be persistent, which means that the contents they point to should not change at runtime, or that their value should not become invalid.
|
|
|
69 |
If this is unavoidable (e.g., when a font is uninstalled at runtime), you should call FTC_Manager_RemoveFaceID as soon as possible, to let the cache get rid of any references to the old FTC_FaceID it may keep internally. Failure to do so will lead to incorrect behaviour or even crashes.
|
|
|
70 |
To use the cache, start with calling FTC_Manager_New to create a new FTC_Manager object, which models a single cache instance. You can then look up FT_Face and FT_Size objects with FTC_Manager_LookupFace and FTC_Manager_LookupSize, respectively.
|
|
|
71 |
If you want to use the charmap caching, call FTC_CMapCache_New, then later use FTC_CMapCache_Lookup to perform the equivalent of FT_Get_Char_Index, only much faster.
|
|
|
72 |
If you want to use the FT_Glyph caching, call FTC_ImageCache, then later use FTC_ImageCache_Lookup to retrieve the corresponding FT_Glyph objects from the cache.
|
|
|
73 |
If you need lots of small bitmaps, it is much more memory efficient to call FTC_SBitCache_New followed by FTC_SBitCache_Lookup. This returns FTC_SBitRec structures, which are used to store small bitmaps directly. (A small bitmap is one whose metrics and dimensions all fit into 8-bit integers).
|
|
|
74 |
We hope to also provide a kerning cache in the near future.
|
|
|
75 |
|
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
80 |
|
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
typedef struct FTC_ManagerRec_* FTC_Manager; |
|
|
84 |
|
|
|
85 |
|
|
|
|
86 |
|
|
|
87 |
This object corresponds to one instance of the cache-subsystem. It is used to cache one or more FT_Face objects, along with corresponding FT_Size objects.
|
|
|
88 |
The manager intentionally limits the total number of opened FT_Face and FT_Size objects to control memory usage. See the ‘max_faces’ and ‘max_sizes’ parameters of FTC_Manager_New.
|
|
|
89 |
The manager is also used to cache ‘nodes’ of various types while limiting their total memory usage.
|
|
|
90 |
All limitations are enforced by keeping lists of managed objects in most-recently-used order, and flushing old nodes to make room for new ones.
|
|
|
91 |
|
|
|
|
92 |
|
|
|
|
93 |
|
|
|
94 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
102 |
|
|
|
|
103 |
|
|
|
108 |
|
|
|
109 |
An opaque pointer type that is used to identity face objects. The contents of such objects is application-dependent.
|
|
|
110 |
These pointers are typically used to point to a user-defined structure containing a font file path, and face index.
|
|
|
111 |
|
|
|
|
112 |
note | |
|
|
113 |
Never use NULL as a valid FTC_FaceID.
|
|
|
114 |
Face IDs are passed by the client to the cache manager, which calls, when needed, the FTC_Face_Requester to translate them into new FT_Face objects.
|
|
|
115 |
If the content of a given face ID changes at runtime, or if the value becomes invalid (e.g., when uninstalling a font), you should immediately call FTC_Manager_RemoveFaceID before any other cache function.
|
|
|
116 |
Failure to do so will result in incorrect behaviour or even memory leaks and crashes.
|
|
|
117 |
|
|
|
|
118 |
|
|
|
|
119 |
|
|
|
120 |
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
128 |
|
|
|
|
129 |
|
|
|
138 |
|
|
|
139 |
A callback function provided by client applications. It is used by the cache manager to translate a given FTC_FaceID into a new valid FT_Face object, on demand.
|
|
|
140 |
|
|
|
|
141 |
input | |
|
|
142 |
|
|
|
143 |
|
|
144 |
face_id | |
|
|
145 |
The face ID to resolve.
|
|
|
146 |
|
|
|
|
147 |
library | |
|
|
148 |
A handle to a FreeType library object.
|
|
|
149 |
|
|
|
|
150 |
req_data | |
|
|
151 |
Application-provided request data (see note below).
|
|
|
152 |
|
|
|
|
153 |
| |
|
|
154 |
|
|
|
|
155 |
|
|
|
163 |
return | |
|
|
164 |
FreeType error code. 0 means success.
|
|
|
165 |
|
|
|
|
166 |
note | |
|
|
167 |
The third parameter ‘req_data’ is the same as the one passed by the client when FTC_Manager_New is called.
|
|
|
168 |
The face requester should not perform funny things on the returned face object, like creating a new FT_Size for it, or setting a transformation through FT_Set_Transform!
|
|
|
169 |
|
|
|
|
170 |
|
|
|
|
171 |
|
|
|
172 |
|
|
|
175 |
|
|
|
176 |
|
|
|
177 |
|
|
|
178 |
|
|
|
179 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
180 |
|
|
|
|
181 |
|
|
|
186 |
|
|
|
187 |
An opaque handle to a cache node object. Each cache node is reference-counted. A node with a count of 0 might be flushed out of a full cache whenever a lookup request is performed.
|
|
|
188 |
If you look up nodes, you have the ability to ‘acquire’ them, i.e., to increment their reference count. This will prevent the node from being flushed out of the cache until you explicitly ‘release’ it (see FTC_Node_Unref).
|
|
|
189 |
See also FTC_SBitCache_Lookup and FTC_ImageCache_Lookup.
|
|
|
190 |
|
|
|
|
191 |
|
|
|
|
192 |
|
|
|
193 |
|
|
|
196 |
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
|
200 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
201 |
|
|
|
|
202 |
|
|
|
214 |
|
|
|
215 |
Create a new cache manager.
|
|
|
216 |
|
|
|
|
217 |
input | |
|
|
218 |
|
|
|
219 |
|
|
220 |
library | |
|
|
221 |
The parent FreeType library handle to use.
|
|
|
222 |
|
|
|
|
223 |
max_faces | |
|
|
224 |
Maximum number of opened FT_Face objects managed by this cache instance. Use 0 for defaults.
|
|
|
225 |
|
|
|
|
226 |
max_sizes | |
|
|
227 |
Maximum number of opened FT_Size objects managed by this cache instance. Use 0 for defaults.
|
|
|
228 |
|
|
|
|
229 |
max_bytes | |
|
|
230 |
Maximum number of bytes to use for cached data nodes. Use 0 for defaults. Note that this value does not account for managed FT_Face and FT_Size objects.
|
|
|
231 |
|
|
|
|
232 |
requester | |
|
|
233 |
An application-provided callback used to translate face IDs into real FT_Face objects.
|
|
|
234 |
|
|
|
|
235 |
req_data | |
|
|
236 |
A generic pointer that is passed to the requester each time it is called (see FTC_Face_Requester).
|
|
|
237 |
|
|
|
|
238 |
| |
|
|
239 |
|
|
|
|
240 |
|
|
|
248 |
return | |
|
|
249 |
FreeType error code. 0 means success.
|
|
|
250 |
|
|
|
|
251 |
|
|
|
|
252 |
|
|
|
253 |
|
|
|
256 |
|
|
|
257 |
|
|
|
280 |
|
|
|
281 |
|
|
|
284 |
|
|
|
285 |
|
|
|
308 |
|
|
|
309 |
|
|
|
312 |
|
|
|
313 |
|
|
|
314 |
|
|
|
315 |
|
|
|
316 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
317 |
|
|
|
|
318 |
|
|
|
326 |
|
|
|
327 |
Retrieve the FT_Face object that corresponds to a given face ID through a cache manager.
|
|
|
328 |
|
|
|
|
329 |
|
|
|
340 |
|
|
|
348 |
return | |
|
|
349 |
FreeType error code. 0 means success.
|
|
|
350 |
|
|
|
|
351 |
note | |
|
|
352 |
The returned FT_Face object is always owned by the manager. You should never try to discard it yourself.
|
|
|
353 |
The FT_Face object doesn't necessarily have a current size object (i.e., face->size can be 0). If you need a specific ‘font size’, use FTC_Manager_LookupSize instead.
|
|
|
354 |
Never change the face's transformation matrix (i.e., never call the FT_Set_Transform function) on a returned face! If you need to transform glyphs, do it yourself after glyph loading.
|
|
|
355 |
When you perform a lookup, out-of-memory errors are detected within the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.
|
|
|
356 |
If a lookup fails with ‘FT_Err_Out_Of_Memory’ the cache has already been completely flushed, and still no memory was available for the operation.
|
|
|
357 |
|
|
|
|
358 |
|
|
|
|
359 |
|
|
|
360 |
|
|
|
363 |
|
|
|
364 |
|
|
|
365 |
|
|
|
366 |
|
|
|
367 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
368 |
|
|
|
|
369 |
|
|
|
383 |
|
|
|
386 |
fields | |
|
|
387 |
|
|
|
388 |
|
|
389 |
face_id | |
|
|
390 |
The source face ID.
|
|
|
391 |
|
|
|
|
392 |
width | |
|
|
393 |
The character width.
|
|
|
394 |
|
|
|
|
395 |
height | |
|
|
396 |
The character height.
|
|
|
397 |
|
|
|
|
398 |
pixel | |
|
|
399 |
A Boolean. If 1, the ‘width’ and ‘height’ fields are interpreted as integer pixel character sizes. Otherwise, they are expressed as 1/64th of points.
|
|
|
400 |
|
|
|
|
401 |
x_res | |
|
|
402 |
Only used when ‘pixel’ is value 0 to indicate the horizontal resolution in dpi.
|
|
|
403 |
|
|
|
|
404 |
y_res | |
|
|
405 |
Only used when ‘pixel’ is value 0 to indicate the vertical resolution in dpi.
|
|
|
406 |
|
|
|
|
407 |
| |
|
|
408 |
|
|
|
|
409 |
note | |
|
|
410 |
This type is mainly used to retrieve FT_Size objects through the cache manager.
|
|
|
411 |
|
|
|
|
412 |
|
|
|
|
413 |
|
|
|
414 |
|
|
|
417 |
|
|
|
418 |
|
|
|
432 |
|
|
|
433 |
|
|
|
436 |
|
|
|
437 |
|
|
|
438 |
|
|
|
439 |
|
|
|
440 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
441 |
|
|
|
|
442 |
|
|
|
450 |
|
|
|
453 |
|
|
|
464 |
|
|
|
472 |
return | |
|
|
473 |
FreeType error code. 0 means success.
|
|
|
474 |
|
|
|
|
475 |
note | |
|
|
476 |
The returned FT_Size object is always owned by the manager. You should never try to discard it by yourself.
|
|
|
477 |
You can access the parent FT_Face object simply as ‘size->face’ if you need it. Note that this object is also owned by the manager.
|
|
|
478 |
|
|
|
|
479 |
note | |
|
|
480 |
When you perform a lookup, out-of-memory errors are detected within the lookup and force incremental flushes of the cache until enough memory is released for the lookup to succeed.
|
|
|
481 |
If a lookup fails with ‘FT_Err_Out_Of_Memory’ the cache has already been completely flushed, and still no memory is available for the operation.
|
|
|
482 |
|
|
|
|
483 |
|
|
|
|
484 |
|
|
|
485 |
|
|
|
488 |
|
|
|
489 |
|
|
|
490 |
|
|
|
491 |
|
|
|
492 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
493 |
|
|
|
|
494 |
|
|
|
501 |
|
|
|
502 |
Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but becomes eligible for subsequent cache flushes.
|
|
|
503 |
|
|
|
|
504 |
|
|
|
515 |
|
|
|
|
516 |
|
|
|
517 |
|
|
|
520 |
|
|
|
521 |
|
|
|
522 |
|
|
|
523 |
|
|
|
524 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
525 |
|
|
|
|
526 |
|
|
|
533 |
|
|
|
534 |
A special function used to indicate to the cache manager that a given FTC_FaceID is no longer valid, either because its content changed, or because it was deallocated or uninstalled.
|
|
|
535 |
|
|
|
|
536 |
|
|
|
547 |
note | |
|
|
548 |
This function flushes all nodes from the cache corresponding to this ‘face_id’, with the exception of nodes with a non-null reference count.
|
|
|
549 |
Such nodes are however modified internally so as to never appear in later lookups with the same ‘face_id’ value, and to be immediately destroyed when released by all their users.
|
|
|
550 |
|
|
|
|
551 |
|
|
|
|
552 |
|
|
|
553 |
|
|
|
556 |
|
|
|
557 |
|
|
|
558 |
|
|
|
559 |
|
|
|
560 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
561 |
|
|
|
|
562 |
|
|
|
563 |
|
|
|
564 |
typedef struct FTC_CMapCacheRec_* FTC_CMapCache; |
|
|
565 |
|
|
|
566 |
|
|
|
|
567 |
|
|
|
568 |
An opaque handle used to model a charmap cache. This cache is to hold character codes -> glyph indices mappings.
|
|
|
569 |
|
|
|
|
570 |
|
|
|
|
571 |
|
|
|
572 |
|
|
|
575 |
|
|
|
576 |
|
|
|
577 |
|
|
|
578 |
|
|
|
579 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
580 |
|
|
|
|
581 |
|
|
|
588 |
|
|
|
589 |
Create a new charmap cache.
|
|
|
590 |
|
|
|
|
591 |
|
|
|
599 |
|
|
|
607 |
return | |
|
|
608 |
FreeType error code. 0 means success.
|
|
|
609 |
|
|
|
|
610 |
note | |
|
|
611 |
Like all other caches, this one will be destroyed with the cache manager.
|
|
|
612 |
|
|
|
|
613 |
|
|
|
|
614 |
|
|
|
615 |
|
|
|
618 |
|
|
|
619 |
|
|
|
620 |
|
|
|
621 |
|
|
|
622 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
623 |
|
|
|
|
624 |
|
|
|
633 |
|
|
|
634 |
Translate a character code into a glyph index, using the charmap cache.
|
|
|
635 |
|
|
|
|
636 |
input | |
|
|
637 |
|
|
|
638 |
|
|
639 |
cache | |
|
|
640 |
A charmap cache handle.
|
|
|
641 |
|
|
|
|
642 |
face_id | |
|
|
643 |
The source face ID.
|
|
|
644 |
|
|
|
|
645 |
cmap_index | |
|
|
646 |
The index of the charmap in the source face. Any negative value means to use the cache FT_Face's default charmap.
|
|
|
647 |
|
|
|
|
648 |
char_code | |
|
|
649 |
The character code (in the corresponding charmap).
|
|
|
650 |
|
|
|
|
651 |
| |
|
|
652 |
|
|
|
|
653 |
return | |
|
|
654 |
Glyph index. 0 means ‘no glyph’.
|
|
|
655 |
|
|
|
|
656 |
|
|
|
|
657 |
|
|
|
658 |
|
|
|
661 |
|
|
|
662 |
|
|
|
700 |
|
|
|
701 |
|
|
|
704 |
|
|
|
705 |
|
|
|
719 |
|
|
|
720 |
|
|
|
723 |
|
|
|
724 |
|
|
|
725 |
|
|
|
726 |
|
|
|
727 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
728 |
|
|
|
|
729 |
|
|
|
730 |
|
|
|
731 |
typedef struct FTC_ImageCacheRec_* FTC_ImageCache; |
|
|
732 |
|
|
|
733 |
|
|
|
|
734 |
|
|
|
735 |
A handle to a glyph image cache object. They are designed to hold many distinct glyph images while not exceeding a certain memory threshold.
|
|
|
736 |
|
|
|
|
737 |
|
|
|
|
738 |
|
|
|
739 |
|
|
|
742 |
|
|
|
743 |
|
|
|
778 |
|
|
|
779 |
|
|
|
782 |
|
|
|
783 |
|
|
|
784 |
|
|
|
785 |
|
|
|
786 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
787 |
|
|
|
|
788 |
|
|
|
798 |
|
|
|
799 |
Retrieve a given glyph image from a glyph image cache.
|
|
|
800 |
|
|
|
|
801 |
|
|
|
815 |
output | |
|
|
816 |
|
|
|
817 |
|
|
818 |
aglyph | |
|
|
819 |
The corresponding FT_Glyph object. 0 in case of failure.
|
|
|
820 |
|
|
|
|
821 |
anode | |
|
|
822 |
Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).
|
|
|
823 |
|
|
|
|
824 |
| |
|
|
825 |
|
|
|
|
826 |
return | |
|
|
827 |
FreeType error code. 0 means success.
|
|
|
828 |
|
|
|
|
829 |
note | |
|
|
830 |
The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with FT_Glyph_Copy and modify the new one.
|
|
|
831 |
If ‘anode’ is not NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the FT_Glyph) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.
|
|
|
832 |
If ‘anode’ is NULL, the cache node is left unchanged, which means that the FT_Glyph could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!
|
|
|
833 |
|
|
|
|
834 |
|
|
|
|
835 |
|
|
|
836 |
|
|
|
839 |
|
|
|
840 |
|
|
|
841 |
|
|
|
842 |
|
|
|
843 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
844 |
|
|
|
|
845 |
|
|
|
856 |
|
|
|
859 |
|
|
|
876 |
output | |
|
|
877 |
|
|
|
878 |
|
|
879 |
aglyph | |
|
|
880 |
The corresponding FT_Glyph object. 0 in case of failure.
|
|
|
881 |
|
|
|
|
882 |
anode | |
|
|
883 |
Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).
|
|
|
884 |
|
|
|
|
885 |
| |
|
|
886 |
|
|
|
|
887 |
return | |
|
|
888 |
FreeType error code. 0 means success.
|
|
|
889 |
|
|
|
|
890 |
note | |
|
|
891 |
The returned glyph is owned and managed by the glyph image cache. Never try to transform or discard it manually! You can however create a copy with FT_Glyph_Copy and modify the new one.
|
|
|
892 |
If ‘anode’ is not NULL, it receives the address of the cache node containing the glyph image, after increasing its reference count. This ensures that the node (as well as the FT_Glyph) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.
|
|
|
893 |
If ‘anode’ is NULL, the cache node is left unchanged, which means that the FT_Glyph could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!
|
|
|
894 |
Calls to FT_Set_Char_Size and friends have no effect on cached glyphs; you should always use the FreeType cache API instead.
|
|
|
895 |
|
|
|
|
896 |
|
|
|
|
897 |
|
|
|
898 |
|
|
|
901 |
|
|
|
902 |
|
|
|
916 |
|
|
|
917 |
|
|
|
920 |
|
|
|
921 |
|
|
|
922 |
|
|
|
923 |
|
|
|
924 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
925 |
|
|
|
|
926 |
|
|
|
946 |
|
|
|
947 |
A very compact structure used to describe a small glyph bitmap.
|
|
|
948 |
|
|
|
|
949 |
fields | |
|
|
950 |
|
|
|
951 |
|
|
952 |
width | |
|
|
953 |
The bitmap width in pixels.
|
|
|
954 |
|
|
|
|
955 |
height | |
|
|
956 |
The bitmap height in pixels.
|
|
|
957 |
|
|
|
|
958 |
left | |
|
|
959 |
The horizontal distance from the pen position to the left bitmap border (a.k.a. ‘left side bearing’, or ‘lsb’).
|
|
|
960 |
|
|
|
|
961 |
top | |
|
|
962 |
The vertical distance from the pen position (on the baseline) to the upper bitmap border (a.k.a. ‘top side bearing’). The distance is positive for upwards y coordinates.
|
|
|
963 |
|
|
|
|
964 |
format | |
|
|
965 |
The format of the glyph bitmap (monochrome or gray).
|
|
|
966 |
|
|
|
|
967 |
max_grays | |
|
|
968 |
Maximum gray level value (in the range 1 to 255).
|
|
|
969 |
|
|
|
|
970 |
pitch | |
|
|
971 |
The number of bytes per bitmap line. May be positive or negative.
|
|
|
972 |
|
|
|
|
973 |
xadvance | |
|
|
974 |
The horizontal advance width in pixels.
|
|
|
975 |
|
|
|
|
976 |
yadvance | |
|
|
977 |
The vertical advance height in pixels.
|
|
|
978 |
|
|
|
|
979 |
buffer | |
|
|
980 |
A pointer to the bitmap pixels.
|
|
|
981 |
|
|
|
|
982 |
| |
|
|
983 |
|
|
|
|
984 |
|
|
|
|
985 |
|
|
|
986 |
|
|
|
989 |
|
|
|
990 |
|
|
|
991 |
|
|
|
992 |
|
|
|
993 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
994 |
|
|
|
|
995 |
|
|
|
996 |
|
|
|
997 |
typedef struct FTC_SBitCacheRec_* FTC_SBitCache; |
|
|
998 |
|
|
|
999 |
|
|
|
|
1000 |
|
|
|
1001 |
A handle to a small bitmap cache. These are special cache objects used to store small glyph bitmaps (and anti-aliased pixmaps) in a much more efficient way than the traditional glyph image cache implemented by FTC_ImageCache.
|
|
|
1002 |
|
|
|
|
1003 |
|
|
|
|
1004 |
|
|
|
1005 |
|
|
|
1008 |
|
|
|
1009 |
|
|
|
1044 |
|
|
|
1045 |
|
|
|
1048 |
|
|
|
1049 |
|
|
|
1050 |
|
|
|
1051 |
|
|
|
1052 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
1053 |
|
|
|
|
1054 |
|
|
|
1064 |
|
|
|
1065 |
Look up a given small glyph bitmap in a given sbit cache and ‘lock’ it to prevent its flushing from the cache until needed.
|
|
|
1066 |
|
|
|
|
1067 |
|
|
|
1081 |
output | |
|
|
1082 |
|
|
|
1083 |
|
|
1084 |
sbit | |
|
|
1085 |
A handle to a small bitmap descriptor.
|
|
|
1086 |
|
|
|
|
1087 |
anode | |
|
|
1088 |
Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).
|
|
|
1089 |
|
|
|
|
1090 |
| |
|
|
1091 |
|
|
|
|
1092 |
return | |
|
|
1093 |
FreeType error code. 0 means success.
|
|
|
1094 |
|
|
|
|
1095 |
note | |
|
|
1096 |
The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.
|
|
|
1097 |
The descriptor's ‘buffer’ field is set to 0 to indicate a missing glyph bitmap.
|
|
|
1098 |
If ‘anode’ is not NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.
|
|
|
1099 |
If ‘anode’ is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!
|
|
|
1100 |
|
|
|
|
1101 |
|
|
|
|
1102 |
|
|
|
1103 |
|
|
|
1106 |
|
|
|
1107 |
|
|
|
1108 |
|
|
|
1109 |
|
|
|
1110 |
Defined in FT_CACHE_H (freetype/ftcache.h). |
|
|
1111 |
|
|
|
|
1112 |
|
|
|
1123 |
|
|
|
1126 |
|
|
|
1143 |
output | |
|
|
1144 |
|
|
|
1145 |
|
|
1146 |
sbit | |
|
|
1147 |
A handle to a small bitmap descriptor.
|
|
|
1148 |
|
|
|
|
1149 |
anode | |
|
|
1150 |
Used to return the address of of the corresponding cache node after incrementing its reference count (see note below).
|
|
|
1151 |
|
|
|
|
1152 |
| |
|
|
1153 |
|
|
|
|
1154 |
return | |
|
|
1155 |
FreeType error code. 0 means success.
|
|
|
1156 |
|
|
|
|
1157 |
note | |
|
|
1158 |
The small bitmap descriptor and its bit buffer are owned by the cache and should never be freed by the application. They might as well disappear from memory on the next cache lookup, so don't treat them as persistent data.
|
|
|
1159 |
The descriptor's ‘buffer’ field is set to 0 to indicate a missing glyph bitmap.
|
|
|
1160 |
If ‘anode’ is not NULL, it receives the address of the cache node containing the bitmap, after increasing its reference count. This ensures that the node (as well as the image) will always be kept in the cache until you call FTC_Node_Unref to ‘release’ it.
|
|
|
1161 |
If ‘anode’ is NULL, the cache node is left unchanged, which means that the bitmap could be flushed out of the cache on the next call to one of the caching sub-system APIs. Don't assume that it is persistent!
|
|
|
1162 |
|
|
|
|
1163 |
|
|
|
|
1164 |
|
|
|
1165 |
|
|
|
1168 |
|
|
|
1169 |
|
|
|
1170 |
|
!DOCTYPE>