Cobbletext  0.2.0
Complex text layout and rendering engine
advance_info.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 #include "common.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
22 typedef uint8_t CobbletextAdvanceType;
23 
27 #define COBBLETEXT_ADVANCE_TYPE_INVALID 0
28 
32 #define COBBLETEXT_ADVANCE_TYPE_GLYPH 1
33 
37 #define COBBLETEXT_ADVANCE_TYPE_INLINE_OBJECT 2
38 
42 #define COBBLETEXT_ADVANCE_TYPE_LINE_BREAK 3
43 
47 #define COBBLETEXT_ADVANCE_TYPE_BIDI 4
48 
52 #define COBBLETEXT_ADVANCE_TYPE_LAYOUT 5
53 
71 
75  uint32_t text_index;
76 
80  int32_t advance_x;
81 
85  int32_t advance_y;
86 
93 
97  int32_t glyph_offset_x;
98 
102  int32_t glyph_offset_y;
103 
110 
117 };
118 
119 #ifdef __cplusplus
120 }
121 #endif
CobbletextCustomPropertyID
uint64_t CobbletextCustomPropertyID
A user-provided integer for custom properties.
Definition: common.h:48
CobbletextAdvanceInfo
Representation of a pen drawing instruction.
Definition: advance_info.h:66
CobbletextInlineObjectID
uint32_t CobbletextInlineObjectID
A user-provided identifer for inline objects.
Definition: common.h:38
CobbletextAdvanceInfo::glyph_offset_x
int32_t glyph_offset_x
Horizontal offset to the current pen position when drawing a glyph.
Definition: advance_info.h:97
CobbletextAdvanceInfo::advance_x
int32_t advance_x
Horizontal movement of the pen.
Definition: advance_info.h:80
CobbletextAdvanceInfo::glyph_id
CobbletextGlyphID glyph_id
Glyph to be drawn.
Definition: advance_info.h:92
CobbletextAdvanceInfo::type
CobbletextAdvanceType type
The type of movement.
Definition: advance_info.h:70
CobbletextAdvanceInfo::custom_property
CobbletextCustomPropertyID custom_property
User-provided custom property.
Definition: advance_info.h:116
CobbletextAdvanceInfo::text_index
uint32_t text_index
Position of the text in code points.
Definition: advance_info.h:75
CobbletextAdvanceInfo::advance_y
int32_t advance_y
Vertical movement of the pen.
Definition: advance_info.h:85
CobbletextAdvanceInfo::glyph_offset_y
int32_t glyph_offset_y
Vertical offset to the current pen position when drawing a glyph.
Definition: advance_info.h:102
CobbletextAdvanceType
uint8_t CobbletextAdvanceType
Type of information contained in #CobbletextAdvanceInfo.
Definition: advance_info.h:22
common.h
CobbletextGlyphID
uint32_t CobbletextGlyphID
Unique glyph ID.
Definition: common.h:31
CobbletextAdvanceInfo::inline_object
CobbletextInlineObjectID inline_object
User-provided inline object ID.
Definition: advance_info.h:109