Commit 0f6db8c
committed
Merge branch 'freetype-font'
* freetype-font:
GLUI: TextRenderer: minor rename refactoring
GLUI: TextRenderer: improve error handling code slightly
GLUI: TextRenderer: reserve cached glyph bitmap before initialization
GLUI: TextRenderer: use std::unique_ptr to free glyph cache entries
GLUI: TextRenderer: reserve space for glyphs vector (performance)
GLUI: DrawUtils: support Orientation::VERTICAL text using TextRenderer
GLUI: TextRenderer: if DejaVu Sans is not available use sans-serif font
GLUI: TextRenderer: fallback: locate font using fontconfig if necessary
GLUI: TextRenderer: move implementation to its own .cc / .hh file
GLUI: TextRenderer: don't crash if no font was loaded
GLUI: TextRenderer: avoid FT_Get_Char_Index for cached glyphs
GLUI: TextRenderer: use unordered_map for glyph_cache
GLUI: TextRenderer: use int for Glyph advance_x (whole pixel offset)
GLUI: TextRenderer: move memcpy offset computation out of the loop
GLUI: DrawUtils: fix font size setup in TextRenderer
GLUI: DrawUtils: no longer select cairo font on cr
GLUI: TextRenderer: add a mutex
GLUI: DrawUtils: port text_extents method to use TextRenderer
GLUI: TextRenderer: move remaining text->surface code here
GLUI: TextRenderer: move str -> glyphs conversion to its own function
GLUI: TextRenderer: reset cache if UI scaling changed
GLUI: TextRenderer: support different font caches for each size
GLUI: TextRenderer: start to migrate text rendering to its own class
GLUI: DrawUtils: implement FontExtents
GLUI: DrawUtils: fix TextExtents computation for character _ (and similar)
GLUI: DrawUtils: support computing TextExtents from bounding box
GLUI: smuitest: support setting string for smuitest textperf
GLUI: DrawUtils: merge text glyphs before masking (performance)
GLUI: DrawUtils: move some code out of the inner loop
GLUI: DrawUtils: add simple glyph cache for text rendering
GLUI: DrawUtils: snap text to device pixels
GLUI: smuitest: add text performance test
GLUI: first prototype: use freetype for rendering fonts directly
Signed-off-by: Stefan Westerfeld <[email protected]>File tree
8 files changed
+491
-33
lines changed- glui
8 files changed
+491
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
5 | 4 | | |
6 | 5 | | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
93 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
94 | 107 | | |
95 | | - | |
96 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
97 | 128 | | |
98 | 129 | | |
99 | 130 | | |
100 | 131 | | |
101 | 132 | | |
102 | 133 | | |
103 | | - | |
| 134 | + | |
104 | 135 | | |
105 | | - | |
| 136 | + | |
106 | 137 | | |
107 | | - | |
| 138 | + | |
108 | 139 | | |
109 | 140 | | |
110 | | - | |
111 | 141 | | |
112 | 142 | | |
113 | 143 | | |
114 | 144 | | |
115 | 145 | | |
116 | 146 | | |
117 | | - | |
| 147 | + | |
118 | 148 | | |
119 | | - | |
| 149 | + | |
120 | 150 | | |
121 | | - | |
| 151 | + | |
122 | 152 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 153 | + | |
128 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
129 | 178 | | |
130 | | - | |
| 179 | + | |
131 | 180 | | |
132 | 181 | | |
133 | | - | |
134 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
135 | 188 | | |
136 | | - | |
137 | | - | |
138 | 189 | | |
139 | 190 | | |
140 | 191 | | |
| |||
149 | 200 | | |
150 | 201 | | |
151 | 202 | | |
152 | | - | |
| 203 | + | |
153 | 204 | | |
154 | 205 | | |
155 | 206 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments