]> git.sesse.net Git - casparcg/blob - core/producer/text/utils/texture_font.h
[text_producer] Removed unused member function measure_string()
[casparcg] / core / producer / text / utils / texture_font.h
1 #pragma once
2
3 #include <string>
4 #include <vector>
5 #include <common/memory.h>
6
7 #include "string_metrics.h"
8 #include "text_info.h"
9 #include "../../../frame/geometry.h"
10
11 namespace caspar { namespace core { namespace text {
12
13 class texture_atlas;
14 enum class unicode_block;
15
16 class texture_font
17 {
18         texture_font();
19         texture_font(const texture_font&);
20         const texture_font& operator=(const texture_font&);
21
22 public:
23         texture_font(texture_atlas&, const text_info&, bool normalize_coordinates);
24         void load_glyphs(unicode_block block, const color<double>& col);
25         void set_tracking(double tracking);
26         std::vector<frame_geometry::coord> create_vertex_stream(const std::wstring& str, int x, int y, int parent_width, int parent_height, string_metrics* metrics, double shear = 0.0);
27         std::wstring get_name() const;
28         double get_size() const;
29
30 private:
31         struct impl;
32         spl::shared_ptr<impl> impl_;
33 };
34
35 enum class unicode_block
36 {
37         Basic_Latin,
38         Latin_1_Supplement,
39         Latin_Extended_A,
40         Latin_Extended_B,
41         IPA_Extensions,
42         Spacing_Modifier_Letters,
43         Combining_Diacritical_Marks,
44         Greek_and_Coptic,
45         Cyrillic,
46         Cyrillic_Supplement,
47         Armenian,
48         Hebrew,
49         Arabic,
50         Syriac,
51         Arabic_Supplement,
52         Thaana,
53         NKo,
54         Samaritan,
55         Mandaic,
56         Arabic_Extended_A,
57         Devanagari,
58         Bengali,
59         Gurmukhi,
60         Gujarati,
61         Oriya,
62         Tamil,
63         Telugu,
64         Kannada,
65         Malayalam,
66         Sinhala,
67         Thai,
68         Lao,
69         Tibetan,
70         Myanmar,
71         Georgian,
72         Hangul_Jamo,
73         Ethiopic,
74         Ethiopic_Supplement,
75         Cherokee,
76         Unified_Canadian_Aboriginal_Syllabics,
77         Ogham,
78         Runic,
79         Tagalog,
80         Hanunoo,
81         Buhid,
82         Tagbanwa,
83         Khmer,
84         Mongolian,
85         Unified_Canadian_Aboriginal_Syllabics_Extended,
86         Limbu,
87         Tai_Le,
88         New_Tai_Lue,
89         Khmer_Symbols,
90         Buginese,
91         Tai_Tham,
92         Balinese,
93         Sundanese,
94         Batak,
95         Lepcha,
96         Ol_Chiki,
97         Sundanese_Supplement,
98         Vedic_Extensions,
99         Phonetic_Extensions,
100         Phonetic_Extensions_Supplement,
101         Combining_Diacritical_Marks_Supplement,
102         Latin_Extended_Additional,
103         Greek_Extended,
104         General_Punctuation,
105         Superscripts_and_Subscripts,
106         Currency_Symbols,
107         Combining_Diacritical_Marks_for_Symbols,
108         Letterlike_Symbols,
109         Number_Forms,
110         Arrows,
111         Mathematical_Operators,
112         Miscellaneous_Technical,
113         Control_Pictures,
114         Optical_Character_Recognition,
115         Enclosed_Alphanumerics,
116         Box_Drawing,
117         Block_Elements,
118         Geometric_Shapes,
119         Miscellaneous_Symbols,
120         Dingbats,
121         Miscellaneous_Mathematical_Symbols_A,
122         Supplemental_Arrows_A,
123         Braille_Patterns,
124         Supplemental_Arrows_B,
125         Miscellaneous_Mathematical_Symbols_B,
126         Supplemental_Mathematical_Operators,
127         Miscellaneous_Symbols_and_Arrows,
128         Glagolitic,
129         Latin_Extended_C,
130         Coptic,
131         Georgian_Supplement,
132         Tifinagh,
133         Ethiopic_Extended,
134         Cyrillic_Extended_A,
135         Supplemental_Punctuation,
136         CJK_Radicals_Supplement,
137         Kangxi_Radicals,
138         Ideographic_Description_Characters,
139         CJK_Symbols_and_Punctuation,
140         Hiragana,
141         Katakana,
142         Bopomofo,
143         Hangul_Compatibility_Jamo,
144         Kanbun,
145         Bopomofo_Extended,
146         CJK_Strokes,
147         Katakana_Phonetic_Extensions,
148         Enclosed_CJK_Letters_and_Months,
149         CJK_Compatibility,
150         CJK_Unified_Ideographs_Extension_A,
151         Yijing_Hexagram_Symbols,
152         CJK_Unified_Ideographs,
153         Yi_Syllables,
154         Yi_Radicals,
155         Lisu,
156         Vai,
157         Cyrillic_Extended_B,
158         Bamum,
159         Modifier_Tone_Letters,
160         Latin_Extended_D,
161         Syloti_Nagri,
162         Common_Indic_Number_Forms,
163         Phags_pa,
164         Saurashtra,
165         Devanagari_Extended,
166         Kayah_Li,
167         Rejang,
168         Hangul_Jamo_Extended_A,
169         Javanese,
170         Cham,
171         Myanmar_Extended_A,
172         Tai_Viet,
173         Meetei_Mayek_Extensions,
174         Ethiopic_Extended_A,
175         Meetei_Mayek,
176         Hangul_Syllables,
177         Hangul_Jamo_Extended_B,
178         High_Surrogates,
179         High_Private_Use_Surrogates,
180         Low_Surrogates,
181         Private_Use_Area,
182         CJK_Compatibility_Ideographs,
183         Alphabetic_Presentation_Forms,
184         Arabic_Presentation_Forms_A,
185         Variation_Selectors,
186         Vertical_Forms,
187         Combining_Half_Marks,
188         CJK_Compatibility_Forms,
189         Small_Form_Variants,
190         Arabic_Presentation_Forms_B,
191         Halfwidth_and_Fullwidth_Forms,
192         Specials,
193         Linear_B_Syllabary,
194         Linear_B_Ideograms,
195         Aegean_Numbers,
196         Ancient_Greek_Numbers,
197         Ancient_Symbols,
198         Phaistos_Disc,
199         Lycian,
200         Carian,
201         Old_Italic,
202         Gothic,
203         Ugaritic,
204         Old_Persian,
205         Deseret,
206         Shavian,
207         Osmanya,
208         Cypriot_Syllabary,
209         Imperial_Aramaic,
210         Phoenician,
211         Lydian,
212         Meroitic_Hieroglyphs,
213         Meroitic_Cursive,
214         Kharoshthi,
215         Old_South_Arabian,
216         Avestan,
217         Inscriptional_Parthian,
218         Inscriptional_Pahlavi,
219         Old_Turkic,
220         Rumi_Numeral_Symbols,
221         Brahmi,
222         Kaithi,
223         Sora_Sompeng,
224         Chakma,
225         Sharada,
226         Takri,
227         Cuneiform,
228         Cuneiform_Numbers_and_Punctuation,
229         Egyptian_Hieroglyphs,
230         Bamum_Supplement,
231         Miao,
232         Kana_Supplement,
233         Byzantine_Musical_Symbols,
234         Musical_Symbols,
235         Ancient_Greek_Musical_Notation,
236         Tai_Xuan_Jing_Symbols,
237         Counting_Rod_Numerals,
238         Mathematical_Alphanumeric_Symbols,
239         Arabic_Mathematical_Alphabetic_Symbols,
240         Mahjong_Tiles,
241         Domino_Tiles,
242         Playing_Cards,
243         Enclosed_Alphanumeric_Supplement,
244         Enclosed_Ideographic_Supplement,
245         Miscellaneous_Symbols_And_Pictographs,
246         Emoticons,
247         Transport_And_Map_Symbols,
248         Alchemical_Symbols,
249         CJK_Unified_Ideographs_Extension_B,
250         CJK_Unified_Ideographs_Extension_C,
251         CJK_Unified_Ideographs_Extension_D,
252         CJK_Compatibility_Ideographs_Supplement,
253         Tags,
254         Variation_Selectors_Supplement,
255         Supplementary_Private_Use_Area_A,
256         Supplementary_Private_Use_Area_B
257 };
258
259 }}}