Code

remove unnecessary casts which didn't compile on old versions of FreeType
[inkscape.git] / src / libnrtype / one-glyph.h
1 /** \file Definition of struct one_glyph. */
3 /*
4  * License: May be redistributed with or without modifications under the terms of the Gnu General
5  * Public License as published by the Free Software Foundation, version 2 or (at your option) any
6  * later version.
7  */
9 #ifndef LIBNRTYPE_ONE_GLYPH_H_INKSCAPE
10 #define LIBNRTYPE_ONE_GLYPH_H_INKSCAPE
12 #include <pango/pango-types.h>
14 /**
15  * Information for a single glyph.
16  *
17  * Pango converts the text into glyphs, but scatters the info for a given glyph; here is a
18  * structure holding what inkscape needs to know.
19  */
20 struct one_glyph {
21     int gl;  ///< glyph_id
22     double x, y; ///< glyph position in the layout (nominal sizes, in the [0..1] range).
23     bool char_start; /**< Whether this glyph is the beginning of a letter. (RTL is taken in
24                       * account.) */
25     bool word_start; ///< Whether this glyph is the beginning of a word.
26     bool para_start; ///< Whether this glyph is the beginning of a paragraph (for indentation).
27     char uni_dir;    ///< BiDi orientation of the run containing this glyph.
28     int uni_st, uni_en; /**< Start and end positions of the text corresponding to this glyph.
29                          * You always have uni_st < uni_en. */
30     PangoFont *font;  /**< Font this glyph uses.  (For bidi text, you need several fonts.)
31                        * When rendering glyphs, check if this font is the one you're using. */
32 };
35 #endif /* !LIBNRTYPE_ONE_GLYPH_H_INKSCAPE */
37 /*
38   Local Variables:
39   mode:c++
40   c-file-style:"stroustrup"
41   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
42   indent-tabs-mode:nil
43   fill-column:99
44   End:
45 */
46 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :