| 1 |
/* font-manager-orthography.h |
| 2 |
* |
| 3 |
* Copyright (C) 2009-2022 Jerry Casiano |
| 4 |
* |
| 5 |
* This program is free software: you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation, either version 3 of the License, or |
| 8 |
* (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program. |
| 17 |
* |
| 18 |
* If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>. |
| 19 |
*/ |
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include <hb.h> |
| 24 |
#include <glib.h> |
| 25 |
#include <json-glib/json-glib.h> |
| 26 |
#include <pango/pango-language.h> |
| 27 |
|
| 28 |
#include "unicode-info.h" |
| 29 |
#include "font-manager-orthography.h" |
| 30 |
|
| 31 |
JsonObject * font_manager_get_orthography_results (JsonObject *font); |
| 32 |
gchar * font_manager_get_sample_string (JsonObject *font); |
| 33 |
|
| 34 |
#define FONT_MANAGER_START_RANGE_PAIR 0x0002 |
| 35 |
#define FONT_MANAGER_END_OF_DATA 0x0000 |
| 36 |
|
| 37 |
/** |
| 38 |
* FontManagerOrthographyData: |
| 39 |
* @name: Untranslated name (English) |
| 40 |
* @native: Translated name, if available |
| 41 |
* @key: Codepoint which MUST be available to support this orthography |
| 42 |
* @sample: Sample string or %NULL |
| 43 |
* @pangram: Array of pangrams or %NULL |
| 44 |
* @values: Array of codepoints |
| 45 |
*/ |
| 46 |
typedef struct |
| 47 |
{ |
| 48 |
const gchar *name; |
| 49 |
const gchar *native; |
| 50 |
const gunichar key; |
| 51 |
const gchar *sample; |
| 52 |
const gchar *pangram [10]; |
| 53 |
const gunichar values [4096]; |
| 54 |
} |
| 55 |
FontManagerOrthographyData; |
| 56 |
|
| 57 |
static const FontManagerOrthographyData ArabicOrthographies [] = { |
| 58 |
#include "Arabic" |
| 59 |
#include "Farsi" |
| 60 |
#include "Urdu" |
| 61 |
#include "Kazakh" |
| 62 |
#include "Pashto" |
| 63 |
#include "Sindhi" |
| 64 |
#include "Uighur" |
| 65 |
}; |
| 66 |
|
| 67 |
static const FontManagerOrthographyData ChineseOrthographies [] = { |
| 68 |
#include "SimplifiedChinese" |
| 69 |
#include "TraditionalChinese" |
| 70 |
#include "ZhuYinFuHao" |
| 71 |
#include "CJKUnified" |
| 72 |
}; |
| 73 |
|
| 74 |
static const FontManagerOrthographyData GreekOrthographies [] = { |
| 75 |
#include "BasicGreek" |
| 76 |
#include "PolytonicGreek" |
| 77 |
#include "ArchaicGreekLetters" |
| 78 |
}; |
| 79 |
|
| 80 |
static const FontManagerOrthographyData JapaneseOrthographies [] = { |
| 81 |
#include "Kana" |
| 82 |
#include "Joyo" |
| 83 |
#include "Jinmeiyo" |
| 84 |
#include "Kokuji" |
| 85 |
}; |
| 86 |
|
| 87 |
static const FontManagerOrthographyData KoreanOrthographies [] = { |
| 88 |
#include "Jamo" |
| 89 |
#include "Hangul" |
| 90 |
#include "SouthKoreanHanja" |
| 91 |
}; |
| 92 |
|
| 93 |
static const FontManagerOrthographyData LatinOrthographies [] = { |
| 94 |
#include "BasicLatin" |
| 95 |
#include "WesternEuropean" |
| 96 |
// Only contains one symbol |
| 97 |
//#include "Euro" |
| 98 |
#include "Catalan" |
| 99 |
#include "Baltic" |
| 100 |
#include "Turkish" |
| 101 |
#include "CentralEuropean" |
| 102 |
#include "Romanian" |
| 103 |
#include "Vietnamese" |
| 104 |
#include "PanAfricanLatin" |
| 105 |
#include "Dutch" |
| 106 |
#include "Afrikaans" |
| 107 |
#include "Pinyin" |
| 108 |
#include "IPA" |
| 109 |
#include "LatinLigatures" |
| 110 |
#include "ClaudianLetters" |
| 111 |
#include "Venda" |
| 112 |
#include "IgboOnwu" |
| 113 |
}; |
| 114 |
|
| 115 |
static const FontManagerOrthographyData UncategorizedOrthographies [] = { |
| 116 |
|
| 117 |
// |
| 118 |
// The Rest: (In Latin alphabetic order for now ... ) |
| 119 |
// |
| 120 |
#include "Ahom" |
| 121 |
#include "AleutCyrillic" |
| 122 |
#include "AleutLatin" |
| 123 |
#include "Armenian" |
| 124 |
#include "Astronomy" |
| 125 |
#include "BasicCyrillic" |
| 126 |
#include "CanadianSyllabics" |
| 127 |
#include "Carian" |
| 128 |
#include "Chakma" |
| 129 |
#include "Cherokee" |
| 130 |
#include "Coptic" |
| 131 |
#include "Currencies" |
| 132 |
#include "Food" |
| 133 |
#include "FullCyrillic" |
| 134 |
#include "Georgian" |
| 135 |
#include "Hebrew" |
| 136 |
#include "Khmer" |
| 137 |
#include "Lao" |
| 138 |
#include "MendeKikakui" |
| 139 |
#include "Miao" |
| 140 |
// Not very useful? |
| 141 |
//#include "MUFI" |
| 142 |
#include "Myanmar" |
| 143 |
#include "Ogham" |
| 144 |
#include "Polynesian" |
| 145 |
#include "Runic" |
| 146 |
#include "Syriac" |
| 147 |
#include "Thaana" |
| 148 |
#include "Thai" |
| 149 |
#include "Tibetan" |
| 150 |
#include "Yi" |
| 151 |
|
| 152 |
// |
| 153 |
// Symbols -- Divide Unicode blocks |
| 154 |
// into meaningful groups such as "chess symbols" |
| 155 |
// as necessary. |
| 156 |
// |
| 157 |
#include "MathematicalGreek" |
| 158 |
#include "MathematicalLatin" |
| 159 |
#include "MathematicalNumerals" |
| 160 |
#include "MathematicalOperators" |
| 161 |
#include "ChessSymbols" |
| 162 |
#include "Emoticons" |
| 163 |
#include "RegionalFlags" |
| 164 |
|
| 165 |
// |
| 166 |
// Indic: |
| 167 |
// |
| 168 |
#include "Bengali" |
| 169 |
#include "Devanagari" |
| 170 |
#include "Kannada" |
| 171 |
#include "Tamil" |
| 172 |
#include "Sinhala" |
| 173 |
#include "Telugu" |
| 174 |
#include "Malayalam" |
| 175 |
#include "Gujarati" |
| 176 |
#include "Gurmukhi" |
| 177 |
#include "Oriya" |
| 178 |
#include "Kaithi" |
| 179 |
#include "Kharoshthi" |
| 180 |
#include "Lepcha" |
| 181 |
#include "Limbu" |
| 182 |
#include "MeeteiMayak" |
| 183 |
#include "OlChiki" |
| 184 |
#include "Saurashtra" |
| 185 |
#include "SylotiNagri" |
| 186 |
#include "VedicExtensions" |
| 187 |
|
| 188 |
// |
| 189 |
// Philippine scripts |
| 190 |
// |
| 191 |
#include "Hanunoo" |
| 192 |
|
| 193 |
// |
| 194 |
// African scripts |
| 195 |
// |
| 196 |
#include "Nko" |
| 197 |
#include "Osmanya" |
| 198 |
#include "Tifinagh" |
| 199 |
#include "Vai" |
| 200 |
#include "Ethiopic" |
| 201 |
|
| 202 |
// 2009.08.27.ET Additions: |
| 203 |
#include "TaiLe" |
| 204 |
#include "NewTaiLue" |
| 205 |
#include "PhagsPa" |
| 206 |
#include "Mongolian" |
| 207 |
#include "TaiTham" |
| 208 |
|
| 209 |
// 2011.04.19,20.ET Addenda: |
| 210 |
#include "Glagolitic" |
| 211 |
#include "Gothic" |
| 212 |
#include "Bamum" |
| 213 |
#include "Brahmi" |
| 214 |
|
| 215 |
#include "Batak" |
| 216 |
#include "Balinese" |
| 217 |
#include "Buginese" |
| 218 |
#include "Cham" |
| 219 |
#include "Javanese" |
| 220 |
#include "KayahLi" |
| 221 |
|
| 222 |
#include "Rejang" |
| 223 |
#include "Sundanese" |
| 224 |
#include "TaiViet" |
| 225 |
|
| 226 |
////////////////////// |
| 227 |
// |
| 228 |
// Historic: |
| 229 |
// |
| 230 |
////////////////////// |
| 231 |
#include "OldSouthArabian" |
| 232 |
#include "LinearBIdeograms" |
| 233 |
#include "LinearBSyllabary" |
| 234 |
#include "CypriotSyllabary" |
| 235 |
#include "MeroiticHieroglyphs" |
| 236 |
#include "MeroiticCursive" |
| 237 |
#include "EgyptianHieroglyphs" |
| 238 |
|
| 239 |
}; |
| 240 |
|
| 241 |
|