Skip to main content

ferroui_base/media/fonts/
font_code_page_coverage.rs

1bitflags::bitflags! {
2    /// Code pages a font declares support for, as recorded in the OS/2 table's
3    /// `ulCodePageRange1` (low 32 bits) and `ulCodePageRange2` (high 32 bits).
4    ///
5    /// Each bit indicates that the font is considered functional for the
6    /// corresponding code page. For fallback selection this is the most reliable
7    /// declared signal of the font's *intended* locale: a CJK font that sets the
8    /// `JapaneseJis` bit but not `ChineseSimplified` is saying "I'm designed for
9    /// Japanese".
10    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
11    pub struct FontCodePageCoverage: u64 {
12        /// No code page coverage declared.
13        const None = 0;
14        const Latin1 = 1 << 0;
15        const Latin2EasternEurope = 1 << 1;
16        const Cyrillic = 1 << 2;
17        const Greek = 1 << 3;
18        const Turkish = 1 << 4;
19        const Hebrew = 1 << 5;
20        const Arabic = 1 << 6;
21        const WindowsBaltic = 1 << 7;
22        const Vietnamese = 1 << 8;
23        const Thai = 1 << 16;
24        const JapaneseJis = 1 << 17;
25        const ChineseSimplified = 1 << 18;
26        const KoreanWansung = 1 << 19;
27        const ChineseTraditional = 1 << 20;
28        const KoreanJohab = 1 << 21;
29        const MacRoman = 1 << 29;
30        const Oem = 1 << 30;
31        const Symbol = 1 << 31;
32        const Ibm869 = 1 << 48;
33        const Msdos866 = 1 << 49;
34        const Msdos865 = 1 << 50;
35        const Arabic864 = 1 << 51;
36        const Msdos863 = 1 << 52;
37        const Hebrew862 = 1 << 53;
38        const Msdos861 = 1 << 54;
39        const Msdos860 = 1 << 55;
40        const IbmTurkish857 = 1 << 56;
41        const IbmCyrillic855 = 1 << 57;
42        const Latin2_852 = 1 << 58;
43        const Msdos775 = 1 << 59;
44        const Greek737 = 1 << 60;
45        const Arabic708 = 1 << 61;
46        const WeLatin1_850 = 1 << 62;
47        const Us437 = 1 << 63;
48    }
49}