Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed
































































































































Rev Author Line No. Line
4349 Serge 1
2
"http://www.w3.org/TR/html4/loose.dtd">
3
4
5
6
FreeType-2.5.0 API Reference
7
32
33
34
 
35
[Index]
36
37
[TOC]
38

FreeType-2.5.0 API Reference

39
 
40

41
Basic Data Types
42
43

Synopsis

44
45
FT_ByteFT_PtrDistFT_Pixel_Mode
46
FT_BytesFT_Stringft_pixel_mode_xxx
47
FT_CharFT_TagFT_Palette_Mode
48
FT_IntFT_ErrorFT_Bitmap
49
FT_UIntFT_FixedFT_IMAGE_TAG
50
FT_Int16FT_PointerFT_Glyph_Format
51
FT_UInt16FT_Posft_glyph_format_xxx
52
FT_Int32FT_VectorFT_Data
53
FT_UInt32FT_BBoxFT_Generic_Finalizer
54
FT_ShortFT_MatrixFT_Generic
55
FT_UShortFT_FWordFT_MAKE_TAG
56
FT_LongFT_UFWordFT_Int64
57
FT_ULongFT_F2Dot14FT_UInt64
58
FT_BoolFT_UnitVector
59
FT_OffsetFT_F26Dot6
60


61
 
62
63

This section contains the basic data types defined by FreeType 2, ranging from simple scalar types to bitmap descriptors. More font-specific structures are defined in a different section.

64

65
66

FT_Byte

67
68
Defined in FT_TYPES_H (freetype/fttypes.h).
69

70
71
 
72
  typedef unsigned char  FT_Byte;
73
 
74

75
76

A simple typedef for the unsigned char type.

77

78
79

80
[Index]
81
82
[TOC]
83
 
84
85

FT_Bytes

86
87
Defined in FT_TYPES_H (freetype/fttypes.h).
88

89
90
 
91
  typedef const FT_Byte*  FT_Bytes;
92
 
93

94
95

A typedef for constant memory areas.

96

97
98

99
[Index]
100
101
[TOC]
102
 
103
104

FT_Char

105
106
Defined in FT_TYPES_H (freetype/fttypes.h).
107

108
109
 
110
  typedef signed char  FT_Char;
111
 
112

113
114

A simple typedef for the signed char type.

115

116
117

118
[Index]
119
120
[TOC]
121
 
122
123

FT_Int

124
125
Defined in FT_TYPES_H (freetype/fttypes.h).
126

127
128
 
129
  typedef signed int  FT_Int;
130
 
131

132
133

A typedef for the int type.

134

135
136

137
[Index]
138
139
[TOC]
140
 
141
142

FT_UInt

143
144
Defined in FT_TYPES_H (freetype/fttypes.h).
145

146
147
 
148
  typedef unsigned int  FT_UInt;
149
 
150

151
152

A typedef for the unsigned int type.

153

154
155

156
[Index]
157
158
[TOC]
159
 
160
161

FT_Int16

162
163
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
164

165
166
 
167
  typedef signed short  FT_Int16;
168
 
169

170
171

A typedef for a 16bit signed integer type.

172

173
174

175
[Index]
176
177
[TOC]
178
 
179
180

FT_UInt16

181
182
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
183

184
185
 
186
  typedef unsigned short  FT_UInt16;
187
 
188

189
190

A typedef for a 16bit unsigned integer type.

191

192
193

194
[Index]
195
196
[TOC]
197
 
198
199

FT_Int32

200
201
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
202

203
204
 
205
  typedef signed XXX  FT_Int32;
206
 
207

208
209

A typedef for a 32bit signed integer type. The size depends on the configuration.

210

211
212

213
[Index]
214
215
[TOC]
216
 
217
218

FT_UInt32

219
220
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
221

222
223
 
224
  typedef unsigned XXX  FT_UInt32;
225
 
226

227
228

229
[Index]
230
231
[TOC]
232
 
233
234

FT_Short

235
236
Defined in FT_TYPES_H (freetype/fttypes.h).
237

238
239
 
240
  typedef signed short  FT_Short;
241
 
242

243
244

A typedef for signed short.

245

246
247

248
[Index]
249
250
[TOC]
251
 
252
253

FT_UShort

254
255
Defined in FT_TYPES_H (freetype/fttypes.h).
256

257
258
 
259
  typedef unsigned short  FT_UShort;
260
 
261

262
263

A typedef for unsigned short.

264

265
266

267
[Index]
268
269
[TOC]
270
 
271
272

FT_Long

273
274
Defined in FT_TYPES_H (freetype/fttypes.h).
275

276
277
 
278
  typedef signed long  FT_Long;
279
 
280

281
282

A typedef for signed long.

283

284
285

286
[Index]
287
288
[TOC]
289
 
290
291

FT_ULong

292
293
Defined in FT_TYPES_H (freetype/fttypes.h).
294

295
296
 
297
  typedef unsigned long  FT_ULong;
298
 
299

300
301

A typedef for unsigned long.

302

303
304

305
[Index]
306
307
[TOC]
308
 
309
310

FT_Bool

311
312
Defined in FT_TYPES_H (freetype/fttypes.h).
313

314
315
 
316
  typedef unsigned char  FT_Bool;
317
 
318

319
320

A typedef of unsigned char, used for simple booleans. As usual, values 1 and 0 represent true and false, respectively.

321

322
323

324
[Index]
325
326
[TOC]
327
 
328
329

FT_Offset

330
331
Defined in FT_TYPES_H (freetype/fttypes.h).
332

333
334
 
335
  typedef size_t  FT_Offset;
336
 
337

338
339

This is equivalent to the ANSI C ‘size_t’ type, i.e., the largest unsigned integer type used to express a file size or position, or a memory block size.

340

341
342

343
[Index]
344
345
[TOC]
346
 
347
348

FT_PtrDist

349
350
Defined in FT_TYPES_H (freetype/fttypes.h).
351

352
353
 
354
  typedef ft_ptrdiff_t  FT_PtrDist;
355
 
356

357
358

This is equivalent to the ANSI C ‘ptrdiff_t’ type, i.e., the largest signed integer type used to express the distance between two pointers.

359

360
361

362
[Index]
363
364
[TOC]
365
 
366
367

FT_String

368
369
Defined in FT_TYPES_H (freetype/fttypes.h).
370

371
372
 
373
  typedef char  FT_String;
374
 
375

376
377

A simple typedef for the char type, usually used for strings.

378

379
380

381
[Index]
382
383
[TOC]
384
 
385
386

FT_Tag

387
388
Defined in FT_TYPES_H (freetype/fttypes.h).
389

390
391
 
392
  typedef FT_UInt32  FT_Tag;
393
 
394

395
396

A typedef for 32-bit tags (as used in the SFNT format).

397

398
399

400
[Index]
401
402
[TOC]
403
 
404
405

FT_Error

406
407
Defined in FT_TYPES_H (freetype/fttypes.h).
408

409
410
 
411
  typedef int  FT_Error;
412
 
413

414
415

The FreeType error code type. A value of 0 is always interpreted as a successful operation.

416

417
418

419
[Index]
420
421
[TOC]
422
 
423
424

FT_Fixed

425
426
Defined in FT_TYPES_H (freetype/fttypes.h).
427

428
429
 
430
  typedef signed long  FT_Fixed;
431
 
432

433
434

This type is used to store 16.16 fixed-point values, like scaling values or matrix coefficients.

435

436
437

438
[Index]
439
440
[TOC]
441
 
442
443

FT_Pointer

444
445
Defined in FT_TYPES_H (freetype/fttypes.h).
446

447
448
 
449
  typedef void*  FT_Pointer;
450
 
451

452
453

A simple typedef for a typeless pointer.

454

455
456

457
[Index]
458
459
[TOC]
460
 
461
462

FT_Pos

463
464
Defined in FT_IMAGE_H (freetype/ftimage.h).
465

466
467
 
468
  typedef signed long  FT_Pos;
469
 
470

471
472

The type FT_Pos is used to store vectorial coordinates. Depending on the context, these can represent distances in integer font units, or 16.16, or 26.6 fixed-point pixel coordinates.

473

474
475

476
[Index]
477
478
[TOC]
479
 
480
481

FT_Vector

482
483
Defined in FT_IMAGE_H (freetype/ftimage.h).
484

485
486
 
487
  typedef struct  FT_Vector_
488
  {
489
    FT_Pos  x;
490
    FT_Pos  y;
491
 
492
  } FT_Vector;
493
 
494

495
496

A simple structure used to store a 2D vector; coordinates are of the FT_Pos type.

497

498
fields
499

500
501
x
502

The horizontal coordinate.

503
504
y
505

The vertical coordinate.

506
507
508
509
510

511
[Index]
512
513
[TOC]
514
 
515
516

FT_BBox

517
518
Defined in FT_IMAGE_H (freetype/ftimage.h).
519

520
521
 
522
  typedef struct  FT_BBox_
523
  {
524
    FT_Pos  xMin, yMin;
525
    FT_Pos  xMax, yMax;
526
 
527
  } FT_BBox;
528
 
529

530
531

A structure used to hold an outline's bounding box, i.e., the coordinates of its extrema in the horizontal and vertical directions.

532

533
fields
534

535
536
xMin
537

The horizontal minimum (left-most).

538
539
yMin
540

The vertical minimum (bottom-most).

541
542
xMax
543

The horizontal maximum (right-most).

544
545
yMax
546

The vertical maximum (top-most).

547
548
549
550
note
551

The bounding box is specified with the coordinates of the lower left and the upper right corner. In PostScript, those values are often called (llx,lly) and (urx,ury), respectively.

552

If ‘yMin’ is negative, this value gives the glyph's descender. Otherwise, the glyph doesn't descend below the baseline. Similarly, if ‘ymax’ is positive, this value gives the glyph's ascender.

553

‘xMin’ gives the horizontal distance from the glyph's origin to the left edge of the glyph's bounding box. If ‘xMin’ is negative, the glyph extends to the left of the origin.

554
555
556

557
[Index]
558
559
[TOC]
560
 
561
562

FT_Matrix

563
564
Defined in FT_TYPES_H (freetype/fttypes.h).
565

566
567
 
568
  typedef struct  FT_Matrix_
569
  {
570
    FT_Fixed  xx, xy;
571
    FT_Fixed  yx, yy;
572
 
573
  } FT_Matrix;
574
 
575

576
577

A simple structure used to store a 2x2 matrix. Coefficients are in 16.16 fixed-point format. The computation performed is:

578
579
   x' = x*xx + y*xy
580
   y' = x*yx + y*yy
581
582

583
fields
584

585
586
xx
587

Matrix coefficient.

588
589
xy
590

Matrix coefficient.

591
592
yx
593

Matrix coefficient.

594
595
yy
596

Matrix coefficient.

597
598
599
600
601

602
[Index]
603
604
[TOC]
605
 
606
607

FT_FWord

608
609
Defined in FT_TYPES_H (freetype/fttypes.h).
610

611
612
 
613
  typedef signed short  FT_FWord;   /* distance in FUnits */
614
 
615

616
617

A signed 16-bit integer used to store a distance in original font units.

618

619
620

621
[Index]
622
623
[TOC]
624
 
625
626

FT_UFWord

627
628
Defined in FT_TYPES_H (freetype/fttypes.h).
629

630
631
 
632
  typedef unsigned short  FT_UFWord;  /* unsigned distance */
633
 
634

635
636

An unsigned 16-bit integer used to store a distance in original font units.

637

638
639

640
[Index]
641
642
[TOC]
643
 
644
645

FT_F2Dot14

646
647
Defined in FT_TYPES_H (freetype/fttypes.h).
648

649
650
 
651
  typedef signed short  FT_F2Dot14;
652
 
653

654
655

A signed 2.14 fixed-point type used for unit vectors.

656

657
658

659
[Index]
660
661
[TOC]
662
 
663
664

FT_UnitVector

665
666
Defined in FT_TYPES_H (freetype/fttypes.h).
667

668
669
 
670
  typedef struct  FT_UnitVector_
671
  {
672
    FT_F2Dot14  x;
673
    FT_F2Dot14  y;
674
 
675
  } FT_UnitVector;
676
 
677

678
679

A simple structure used to store a 2D vector unit vector. Uses FT_F2Dot14 types.

680

681
fields
682

683
684
x
685

Horizontal coordinate.

686
687
y
688

Vertical coordinate.

689
690
691
692
693

694
[Index]
695
696
[TOC]
697
 
698
699

FT_F26Dot6

700
701
Defined in FT_TYPES_H (freetype/fttypes.h).
702

703
704
 
705
  typedef signed long  FT_F26Dot6;
706
 
707

708
709

A signed 26.6 fixed-point type used for vectorial pixel coordinates.

710

711
712

713
[Index]
714
715
[TOC]
716
 
717
718

FT_Pixel_Mode

719
720
Defined in FT_IMAGE_H (freetype/ftimage.h).
721

722
723
 
724
  typedef enum  FT_Pixel_Mode_
725
  {
726
    FT_PIXEL_MODE_NONE = 0,
727
    FT_PIXEL_MODE_MONO,
728
    FT_PIXEL_MODE_GRAY,
729
    FT_PIXEL_MODE_GRAY2,
730
    FT_PIXEL_MODE_GRAY4,
731
    FT_PIXEL_MODE_LCD,
732
    FT_PIXEL_MODE_LCD_V,
733
    FT_PIXEL_MODE_BGRA,
734
 
735
    FT_PIXEL_MODE_MAX      /* do not remove */
736
 
737
  } FT_Pixel_Mode;
738
 
739

740
741

An enumeration type used to describe the format of pixels in a given bitmap. Note that additional formats may be added in the future.

742

743
values
744

745
746
FT_PIXEL_MODE_NONE
747

Value 0 is reserved.

748
749
FT_PIXEL_MODE_MONO
750

A monochrome bitmap, using 1 bit per pixel. Note that pixels are stored in most-significant order (MSB), which means that the left-most pixel in a byte has value 128.

751
752
FT_PIXEL_MODE_GRAY
753

An 8-bit bitmap, generally used to represent anti-aliased glyph images. Each pixel is stored in one byte. Note that the number of ‘gray’ levels is stored in the ‘num_grays’ field of the FT_Bitmap structure (it generally is 256).

754
755
FT_PIXEL_MODE_GRAY2
756

A 2-bit per pixel bitmap, used to represent embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.

757
758
FT_PIXEL_MODE_GRAY4
759

A 4-bit per pixel bitmap, representing embedded anti-aliased bitmaps in font files according to the OpenType specification. We haven't found a single font using this format, however.

760
761
FT_PIXEL_MODE_LCD
762

An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on LCD displays; the bitmap is three times wider than the original glyph image. See also FT_RENDER_MODE_LCD.

763
764
FT_PIXEL_MODE_LCD_V
765

An 8-bit bitmap, representing RGB or BGR decimated glyph images used for display on rotated LCD displays; the bitmap is three times taller than the original glyph image. See also FT_RENDER_MODE_LCD_V.

766
767
FT_PIXEL_MODE_BGRA
768

An image with four 8-bit channels per pixel, representing a color image (such as emoticons) with alpha channel. For each pixel, the format is BGRA, which means, the blue channel comes first in memory. The color channels are pre-multiplied and in the sRGB colorspace. For example, full red at half-translucent opacity will be represented as ‘00,00,80,80’, not ‘00,00,FF,80’. See also FT_LOAD_COLOR.

769
770
771
772
773

774
[Index]
775
776
[TOC]
777
 
778
779

ft_pixel_mode_xxx

780
781
Defined in FT_IMAGE_H (freetype/ftimage.h).
782

783
784
 
785
#define ft_pixel_mode_none   FT_PIXEL_MODE_NONE
786
#define ft_pixel_mode_mono   FT_PIXEL_MODE_MONO
787
#define ft_pixel_mode_grays  FT_PIXEL_MODE_GRAY
788
#define ft_pixel_mode_pal2   FT_PIXEL_MODE_GRAY2
789
#define ft_pixel_mode_pal4   FT_PIXEL_MODE_GRAY4
790
 
791

792
793

A list of deprecated constants. Use the corresponding FT_Pixel_Mode values instead.

794

795
values
796

797
798
ft_pixel_mode_none
799

See FT_PIXEL_MODE_NONE.

800
801
ft_pixel_mode_mono
802

See FT_PIXEL_MODE_MONO.

803
804
ft_pixel_mode_grays
805

See FT_PIXEL_MODE_GRAY.

806
807
ft_pixel_mode_pal2
808

See FT_PIXEL_MODE_GRAY2.

809
810
ft_pixel_mode_pal4
811

See FT_PIXEL_MODE_GRAY4.

812
813
814
815
816

817
[Index]
818
819
[TOC]
820
 
821
822

FT_Palette_Mode

823
824
Defined in FT_IMAGE_H (freetype/ftimage.h).
825

826
827
 
828
  typedef enum  FT_Palette_Mode_
829
  {
830
    ft_palette_mode_rgb = 0,
831
    ft_palette_mode_rgba,
832
 
833
    ft_palette_mode_max   /* do not remove */
834
 
835
  } FT_Palette_Mode;
836
 
837

838
839

THIS TYPE IS DEPRECATED. DO NOT USE IT!

840

An enumeration type to describe the format of a bitmap palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8.

841

842
values
843

844
845
ft_palette_mode_rgb
846

The palette is an array of 3-byte RGB records.

847
848
ft_palette_mode_rgba
849

The palette is an array of 4-byte RGBA records.

850
851
852
853
note
854

As ft_pixel_mode_pal2, pal4 and pal8 are currently unused by FreeType, these types are not handled by the library itself.

855
856
857

858
[Index]
859
860
[TOC]
861
 
862
863

FT_Bitmap

864
865
Defined in FT_IMAGE_H (freetype/ftimage.h).
866

867
868
 
869
  typedef struct  FT_Bitmap_
870
  {
871
    int             rows;
872
    int             width;
873
    int             pitch;
874
    unsigned char*  buffer;
875
    short           num_grays;
876
    char            pixel_mode;
877
    char            palette_mode;
878
    void*           palette;
879
 
880
  } FT_Bitmap;
881
 
882

883
884

A structure used to describe a bitmap or pixmap to the raster. Note that we now manage pixmaps of various depths through the ‘pixel_mode’ field.

885

886
fields
887

888
889
rows
890

The number of bitmap rows.

891
892
width
893

The number of pixels in bitmap row.

894
895
pitch
896

The pitch's absolute value is the number of bytes taken by one bitmap row, including padding. However, the pitch is positive when the bitmap has a ‘down’ flow, and negative when it has an ‘up’ flow. In all cases, the pitch is an offset to add to a bitmap pointer in order to go down one row.

897

Note that ‘padding’ means the alignment of a bitmap to a byte border, and FreeType functions normally align to the smallest possible integer value.

898

For the B/W rasterizer, ‘pitch’ is always an even number.

899

To change the pitch of a bitmap (say, to make it a multiple of 4), use FT_Bitmap_Convert. Alternatively, you might use callback functions to directly render to the application's surface; see the file ‘example2.cpp’ in the tutorial for a demonstration.

900
901
buffer
902

A typeless pointer to the bitmap buffer. This value should be aligned on 32-bit boundaries in most cases.

903
904
num_grays
905

This field is only used with FT_PIXEL_MODE_GRAY; it gives the number of gray levels used in the bitmap.

906
907
pixel_mode
908

The pixel mode, i.e., how pixel bits are stored. See FT_Pixel_Mode for possible values.

909
910
palette_mode
911

This field is intended for paletted pixel modes; it indicates how the palette is stored. Not used currently.

912
913
palette
914

A typeless pointer to the bitmap palette; this field is intended for paletted pixel modes. Not used currently.

915
916
917
918
note
919

For now, the only pixel modes supported by FreeType are mono and grays. However, drivers might be added in the future to support more ‘colorful’ options.

920
921
922

923
[Index]
924
925
[TOC]
926
 
927
928

FT_IMAGE_TAG

929
930
Defined in FT_IMAGE_H (freetype/ftimage.h).
931

932
933
 
934
#ifndef FT_IMAGE_TAG
935
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  \
936
          value = ( ( (unsigned long)_x1 << 24 ) | \
937
                    ( (unsigned long)_x2 << 16 ) | \
938
                    ( (unsigned long)_x3 << 8  ) | \
939
                      (unsigned long)_x4         )
940
#endif /* FT_IMAGE_TAG */
941
 
942

943
944

This macro converts four-letter tags to an unsigned long type.

945

946
note
947

Since many 16-bit compilers don't like 32-bit enumerations, you should redefine this macro in case of problems to something like this:

948
949
  #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 )  value
950
951

to get a simple enumeration without assigning special numbers.

952
953
954

955
[Index]
956
957
[TOC]
958
 
959
960

FT_Glyph_Format

961
962
Defined in FT_IMAGE_H (freetype/ftimage.h).
963

964
965
 
966
  typedef enum  FT_Glyph_Format_
967
  {
968
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_NONE, 0, 0, 0, 0 ),
969
 
970
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_COMPOSITE, 'c', 'o', 'm', 'p' ),
971
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_BITMAP,    'b', 'i', 't', 's' ),
972
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_OUTLINE,   'o', 'u', 't', 'l' ),
973
    FT_IMAGE_TAG( FT_GLYPH_FORMAT_PLOTTER,   'p', 'l', 'o', 't' )
974
 
975
  } FT_Glyph_Format;
976
 
977

978
979

An enumeration type used to describe the format of a given glyph image. Note that this version of FreeType only supports two image formats, even though future font drivers will be able to register their own format.

980

981
values
982

983
984
FT_GLYPH_FORMAT_NONE
985

The value 0 is reserved.

986
987
FT_GLYPH_FORMAT_COMPOSITE
988
989

The glyph image is a composite of several other images. This format is only used with FT_LOAD_NO_RECURSE, and is used to report compound glyphs (like accented characters).

990
991
FT_GLYPH_FORMAT_BITMAP
992

The glyph image is a bitmap, and can be described as an FT_Bitmap. You generally need to access the ‘bitmap’ field of the FT_GlyphSlotRec structure to read it.

993
994
FT_GLYPH_FORMAT_OUTLINE
995
996

The glyph image is a vectorial outline made of line segments and Bézier arcs; it can be described as an FT_Outline; you generally want to access the ‘outline’ field of the FT_GlyphSlotRec structure to read it.

997
998
FT_GLYPH_FORMAT_PLOTTER
999
1000

The glyph image is a vectorial path with no inside and outside contours. Some Type 1 fonts, like those in the Hershey family, contain glyphs in this format. These are described as FT_Outline, but FreeType isn't currently capable of rendering them correctly.

1001
1002
1003
1004
1005

1006
[Index]
1007
1008
[TOC]
1009
 
1010
1011

ft_glyph_format_xxx

1012
1013
Defined in FT_IMAGE_H (freetype/ftimage.h).
1014

1015
1016
 
1017
#define ft_glyph_format_none       FT_GLYPH_FORMAT_NONE
1018
#define ft_glyph_format_composite  FT_GLYPH_FORMAT_COMPOSITE
1019
#define ft_glyph_format_bitmap     FT_GLYPH_FORMAT_BITMAP
1020
#define ft_glyph_format_outline    FT_GLYPH_FORMAT_OUTLINE
1021
#define ft_glyph_format_plotter    FT_GLYPH_FORMAT_PLOTTER
1022
 
1023

1024
1025

A list of deprecated constants. Use the corresponding FT_Glyph_Format values instead.

1026

1027
values
1028

1029
1030
ft_glyph_format_none
1031

See FT_GLYPH_FORMAT_NONE.

1032
1033
ft_glyph_format_composite
1034
1035

See FT_GLYPH_FORMAT_COMPOSITE.

1036
1037
ft_glyph_format_bitmap
1038

See FT_GLYPH_FORMAT_BITMAP.

1039
1040
ft_glyph_format_outline
1041
1042

See FT_GLYPH_FORMAT_OUTLINE.

1043
1044
ft_glyph_format_plotter
1045
1046

See FT_GLYPH_FORMAT_PLOTTER.

1047
1048
1049
1050
1051

1052
[Index]
1053
1054
[TOC]
1055
 
1056
1057

FT_Data

1058
1059
Defined in FT_TYPES_H (freetype/fttypes.h).
1060

1061
1062
 
1063
  typedef struct  FT_Data_
1064
  {
1065
    const FT_Byte*  pointer;
1066
    FT_Int          length;
1067
 
1068
  } FT_Data;
1069
 
1070

1071
1072

Read-only binary data represented as a pointer and a length.

1073

1074
fields
1075

1076
1077
pointer
1078

The data.

1079
1080
length
1081

The length of the data in bytes.

1082
1083
1084
1085
1086

1087
[Index]
1088
1089
[TOC]
1090
 
1091
1092

FT_Generic_Finalizer

1093
1094
Defined in FT_TYPES_H (freetype/fttypes.h).
1095

1096
1097
 
1098
  typedef void  (*FT_Generic_Finalizer)(void*  object);
1099
 
1100

1101
1102

Describe a function used to destroy the ‘client’ data of any FreeType object. See the description of the FT_Generic type for details of usage.

1103

1104
input
1105

The address of the FreeType object which is under finalization. Its client data is accessed through its ‘generic’ field.

1106
1107
1108

1109
[Index]
1110
1111
[TOC]
1112
 
1113
1114

FT_Generic

1115
1116
Defined in FT_TYPES_H (freetype/fttypes.h).
1117

1118
1119
 
1120
  typedef struct  FT_Generic_
1121
  {
1122
    void*                 data;
1123
    FT_Generic_Finalizer  finalizer;
1124
 
1125
  } FT_Generic;
1126
 
1127

1128
1129

Client applications often need to associate their own data to a variety of FreeType core objects. For example, a text layout API might want to associate a glyph cache to a given size object.

1130

Some FreeType object contains a ‘generic’ field, of type FT_Generic, which usage is left to client applications and font servers.

1131

It can be used to store a pointer to client-specific data, as well as the address of a ‘finalizer’ function, which will be called by FreeType when the object is destroyed (for example, the previous client example would put the address of the glyph cache destructor in the ‘finalizer’ field).

1132

1133
fields
1134

1135
1136
data
1137

A typeless pointer to any client-specified data. This field is completely ignored by the FreeType library.

1138
1139
finalizer
1140

A pointer to a ‘generic finalizer’ function, which will be called when the object is destroyed. If this field is set to NULL, no code will be called.

1141
1142
1143
1144
1145

1146
[Index]
1147
1148
[TOC]
1149
 
1150
1151

FT_MAKE_TAG

1152
1153
Defined in FT_TYPES_H (freetype/fttypes.h).
1154

1155
1156
 
1157
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
1158
          (FT_Tag)                        \
1159
          ( ( (FT_ULong)_x1 << 24 ) |     \
1160
            ( (FT_ULong)_x2 << 16 ) |     \
1161
            ( (FT_ULong)_x3 <<  8 ) |     \
1162
              (FT_ULong)_x4         )
1163
 
1164

1165
1166

This macro converts four-letter tags which are used to label TrueType tables into an unsigned long to be used within FreeType.

1167

1168
note
1169

The produced values must be 32-bit integers. Don't redefine this macro.

1170
1171
1172

1173
[Index]
1174
1175
[TOC]
1176
 
1177
1178

FT_Int64

1179
1180
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
1181

1182
1183
 
1184
  typedef signed XXX  FT_Int64;
1185
 
1186

1187
1188

1189
[Index]
1190
1191
[TOC]
1192
 
1193
1194

FT_UInt64

1195
1196
Defined in FT_CONFIG_CONFIG_H (freetype/config/ftconfig.h).
1197

1198
1199
 
1200
  typedef unsigned XXX  FT_UInt64;
1201
 
1202

1203
1204

1205
[Index]
1206
1207
[TOC]
1208
 
1209
1210