sdk-world v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Loading...
Searching...
No Matches
ftbbox.h
Go to the documentation of this file.
1/****************************************************************************
2 *
3 * ftbbox.h
4 *
5 * FreeType exact bbox computation (specification).
6 *
7 * Copyright (C) 1996-2025 by
8 * David Turner, Robert Wilhelm, and Werner Lemberg.
9 *
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
15 *
16 */
17
18
19 /**************************************************************************
20 *
21 * This component has a _single_ role: to compute exact outline bounding
22 * boxes.
23 *
24 * It is separated from the rest of the engine for various technical
25 * reasons. It may well be integrated in 'ftoutln' later.
26 *
27 */
28
29
34#ifndef FTBBOX_H_
35#define FTBBOX_H_
36
37
38#include <freetype/freetype.h>
39
40#ifdef FREETYPE_H
41#error "freetype.h of FreeType 1 has been loaded!"
42#error "Please fix the directory search order for header files"
43#error "so that freetype.h of FreeType 2 is found first."
44#endif
45
46
47FT_BEGIN_HEADER
48
49
50 /**************************************************************************
51 *
52 * @section:
53 * outline_processing
54 *
55 */
56
57
58 /**************************************************************************
59 *
60 * @function:
61 * FT_Outline_Get_BBox
62 *
63 * @description:
64 * Compute the exact bounding box of an outline. This is slower than
65 * computing the control box. However, it uses an advanced algorithm
66 * that returns _very_ quickly when the two boxes coincide. Otherwise,
67 * the outline Bezier arcs are traversed to extract their extrema.
68 *
69 * @input:
70 * outline ::
71 * A pointer to the source outline.
72 *
73 * @output:
74 * abbox ::
75 * The outline's exact bounding box.
76 *
77 * @return:
78 * FreeType error code. 0~means success.
79 *
80 * @note:
81 * If the font is tricky and the glyph has been loaded with
82 * @FT_LOAD_NO_SCALE, the resulting BBox is meaningless. To get
83 * reasonable values for the BBox it is necessary to load the glyph at a
84 * large ppem value (so that the hinting instructions can properly shift
85 * and scale the subglyphs), then extracting the BBox, which can be
86 * eventually converted back to font units.
87 */
88 FT_EXPORT( FT_Error )
89 FT_Outline_Get_BBox( FT_Outline* outline,
90 FT_BBox *abbox );
91
92 /* */
93
94
95FT_END_HEADER
96
97#endif /* FTBBOX_H_ */
98
99
100/* END */
101
102
103/* Local Variables: */
104/* coding: utf-8 */
105/* End: */