sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ftsynth.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftsynth.h
4 *
5 * FreeType synthesizing code for emboldening and slanting
6 * (specification).
7 *
8 * Copyright (C) 2000-2025 by
9 * David Turner, Robert Wilhelm, and Werner Lemberg.
10 *
11 * This file is part of the FreeType project, and may only be used,
12 * modified, and distributed under the terms of the FreeType project
13 * license, LICENSE.TXT. By continuing to use, modify, or distribute
14 * this file you indicate that you have read the license and
15 * understand and accept it fully.
16 *
17 */
18
19
20 /*************************************************************************/
21 /*************************************************************************/
22 /*************************************************************************/
23 /*************************************************************************/
24 /*************************************************************************/
25 /********* *********/
26 /********* WARNING, THIS IS ALPHA CODE! THIS API *********/
27 /********* IS DUE TO CHANGE UNTIL STRICTLY NOTIFIED BY THE *********/
28 /********* FREETYPE DEVELOPMENT TEAM *********/
29 /********* *********/
30 /*************************************************************************/
31 /*************************************************************************/
32 /*************************************************************************/
33 /*************************************************************************/
34 /*************************************************************************/
35
36
37 /* Main reason for not lifting the functions in this module to a */
38 /* 'standard' API is that the used parameters for emboldening and */
39 /* slanting are not configurable. Consider the functions as a */
40 /* code resource that should be copied into the application and */
41 /* adapted to the particular needs. */
42
43
48#ifndef FTSYNTH_H_
49#define FTSYNTH_H_
50
51
52#include <freetype/freetype.h>
53
54#ifdef FREETYPE_H
55#error "freetype.h of FreeType 1 has been loaded!"
56#error "Please fix the directory search order for header files"
57#error "so that freetype.h of FreeType 2 is found first."
58#endif
59
60
61FT_BEGIN_HEADER
62
63 /* Embolden a glyph by a 'reasonable' value (which is highly a matter of */
64 /* taste). This function is actually a convenience function, providing */
65 /* a wrapper for @FT_Outline_Embolden and @FT_Bitmap_Embolden. */
66 /* */
67 /* For emboldened outlines the height, width, and advance metrics are */
68 /* increased by the strength of the emboldening -- this even affects */
69 /* mono-width fonts! */
70 /* */
71 /* You can also call @FT_Outline_Get_CBox to get precise values. */
72 FT_EXPORT( void )
73 FT_GlyphSlot_Embolden( FT_GlyphSlot slot );
74
75 /* Precisely adjust the glyph weight either horizontally or vertically. */
76 /* The `xdelta` and `ydelta` values are fractions of the face Em size */
77 /* (in fixed-point format). Considering that a regular face would have */
78 /* stem widths on the order of 0.1 Em, a delta of 0.05 (0x0CCC) should */
79 /* be very noticeable. To increase or decrease the weight, use positive */
80 /* or negative values, respectively. */
81 FT_EXPORT( void )
82 FT_GlyphSlot_AdjustWeight( FT_GlyphSlot slot,
83 FT_Fixed xdelta,
84 FT_Fixed ydelta );
85
86
87 /* Slant an outline glyph to the right by about 12 degrees. */
88 FT_EXPORT( void )
89 FT_GlyphSlot_Oblique( FT_GlyphSlot slot );
90
91 /* Slant an outline glyph by a given sine of an angle. You can apply */
92 /* slant along either x- or y-axis by choosing a corresponding non-zero */
93 /* argument. If both slants are non-zero, some affine transformation */
94 /* will result. */
95 FT_EXPORT( void )
96 FT_GlyphSlot_Slant( FT_GlyphSlot slot,
97 FT_Fixed xslant,
98 FT_Fixed yslant );
99
100 /* */
101
102
103FT_END_HEADER
104
105#endif /* FTSYNTH_H_ */
106
107
108/* END */