Ticket #11518: 11518-BFont_Blocks.patch

File 11518-BFont_Blocks.patch, 45.6 KB (added by dsizzle, 8 years ago)

Implementation of BFont::Blocks

  • build/jam/BuildFeatures

    diff --git a/build/jam/BuildFeatures b/build/jam/BuildFeatures
    index e70a411..1e54b7b 100644
    a b if [ IsPackageAvailable freetype_devel ] {  
    272272    Echo "Freetype support not available on $(TARGET_PACKAGING_ARCH)" ;
    273273}
    274274
     275# fontconfig
     276if [ IsPackageAvailable fontconfig_devel ] {
     277    ExtractBuildFeatureArchives fontconfig :
     278        file: base fontconfig
     279            runtime: lib
     280        file: devel fontconfig_devel
     281            depends: base
     282            library: $(developLibDir)/libfontconfig.so
     283            headers: $(developHeadersDir) $(developHeadersDir)/fontconfig
     284        ;
     285
     286    EnableBuildFeatures fontconfig ;
     287} else {
     288    Echo "fontconfig support not available on $(TARGET_PACKAGING_ARCH)" ;
     289}
    275290
    276291# Gutenprint
    277292if [ IsPackageAvailable gutenprint_devel ] {
  • build/jam/DefaultBuildProfiles

    diff --git a/build/jam/DefaultBuildProfiles b/build/jam/DefaultBuildProfiles
    index e88c9cf..3f4db63 100644
    a b rule DefineDefaultBuildProfiles  
    162162                dejavu
    163163                expat
    164164                flex
     165                fontconfig_devel
    165166                freetype_devel
    166167                gawk
    167168                gcc
    rule DefineDefaultBuildProfiles  
    190191                        curl
    191192                        curl_devel
    192193                        expat
     194                        fontconfig
     195                        fontconfig_devel
    193196                        freetype
    194197                        freetype_devel
    195198                        gcc
  • headers/os/interface/Font.h

    diff --git a/headers/os/interface/Font.h b/headers/os/interface/Font.h
    index eb7d59c..d10b54b 100644
    a b  
    11/*
    2  * Copyright 2005-2015, Haiku, Inc. All rights reserved.
     2 * Copyright 2005-2016, Haiku, Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 */
    55#ifndef _FONT_H_
     
    99#include <SupportDefs.h>
    1010#include <InterfaceDefs.h>
    1111
    12 
    1312class BPoint;
    1413
    1514
    enum font_file_format {  
    106105class unicode_block {
    107106public:
    108107    inline                      unicode_block();
    109     inline                      unicode_block(uint64 block2, uint64 block1);
     108    inline                      unicode_block( uint64 block4, uint64 block3,
     109                                            uint64 block2, uint64 block1);
    110110
    111111    inline  bool                Includes(const unicode_block& block) const;
    112112    inline  unicode_block       operator&(const unicode_block& block) const;
    public:  
    114114    inline  unicode_block&      operator=(const unicode_block& block);
    115115    inline  bool                operator==(const unicode_block& block) const;
    116116    inline  bool                operator!=(const unicode_block& block) const;
    117 
    118117private:
    119     uint64                  fData[2];
     118    uint64                  fData[4];
     119};
     120
     121
     122struct unicode_block_range {
     123    uint32                  start;
     124    uint32                  end;
     125    const unicode_block&    block;
     126
     127    uint32 Count() const { return end + 1 - start; }
    120128};
    121129
    122130
    bool update_font_families(bool checkOnly);  
    326334unicode_block::unicode_block()
    327335{
    328336    fData[0] = fData[1] = 0LL;
     337    fData[2] = fData[3] = 0LL;
    329338}
    330339
    331340
    332 unicode_block::unicode_block(uint64 block2, uint64 block1)
     341unicode_block::unicode_block(uint64 block4, uint64 block3, uint64 block2, uint64 block1)
    333342{
    334343    fData[0] = block1;
    335344    fData[1] = block2;
     345    fData[2] = block3;
     346    fData[3] = block4;
     347   
    336348}
    337349
    338350
    bool  
    340352unicode_block::Includes(const unicode_block& block) const
    341353{
    342354    return (fData[0] & block.fData[0]) == block.fData[0]
    343         && (fData[1] & block.fData[1]) == block.fData[1];
     355        && (fData[1] & block.fData[1]) == block.fData[1]
     356        && (fData[2] & block.fData[2]) == block.fData[2]
     357        && (fData[3] & block.fData[3]) == block.fData[3];
    344358}
    345359
    346360
    unicode_block::operator&(const unicode_block& block) const  
    350364    unicode_block result;
    351365    result.fData[0] = fData[0] & block.fData[0];
    352366    result.fData[1] = fData[1] & block.fData[1];
     367    result.fData[2] = fData[2] & block.fData[2];
     368    result.fData[3] = fData[3] & block.fData[3];
    353369
    354370    return result;
    355371}
    unicode_block::operator|(const unicode_block& block) const  
    361377    unicode_block result;
    362378    result.fData[0] = fData[0] | block.fData[0];
    363379    result.fData[1] = fData[1] | block.fData[1];
    364 
     380    result.fData[2] = fData[2] | block.fData[2];
     381    result.fData[3] = fData[3] | block.fData[3];
     382   
    365383    return result;
    366384}
    367385
    unicode_block::operator=(const unicode_block& block)  
    371389{
    372390    fData[0] = block.fData[0];
    373391    fData[1] = block.fData[1];
     392    fData[2] = block.fData[2];
     393    fData[3] = block.fData[3];
     394   
    374395    return *this;
    375396}
    376397
    unicode_block::operator=(const unicode_block& block)  
    378399bool
    379400unicode_block::operator==(const unicode_block& block) const
    380401{
    381     return fData[0] == block.fData[0] && fData[1] == block.fData[1];
     402    return fData[0] == block.fData[0]
     403        && fData[1] == block.fData[1]
     404        && fData[2] == block.fData[2]
     405        && fData[3] == block.fData[3];
    382406}
    383407
    384408
    385409bool
    386410unicode_block::operator!=(const unicode_block& block) const
    387411{
    388     return fData[0] != block.fData[0] || fData[1] != block.fData[1];
     412    return fData[0] != block.fData[0]
     413        || fData[1] != block.fData[1]
     414        || fData[2] != block.fData[2]
     415        || fData[3] != block.fData[3];
    389416}
    390417
    391418
  • headers/os/interface/UnicodeBlockObjects.h

    diff --git a/headers/os/interface/UnicodeBlockObjects.h b/headers/os/interface/UnicodeBlockObjects.h
    index ed5061e..f18b61f 100644
    a b  
    11/*
    2  * Copyright 2001-2009, Haiku, Inc. All rights reserved.
     2 * Copyright 2001-2016, Haiku, Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 */
    55#ifndef _UNICODEBLOCKOBJECTS_H
    66#define _UNICODEBLOCKOBJECTS_H
    77
    8 
    98#include <Font.h>
    109
    11 
    1210// Unicode block list with their unicode encoding range
    13 const unicode_block B_BASIC_LATIN_BLOCK(                    /* 0000 - 007F          */  0x0000000000000000LL, 0x0000000000000001LL);
    14 const unicode_block B_LATIN1_SUPPLEMENT_BLOCK(              /* 0080 - 00FF          */  0x0000000000000000LL, 0x0000000000000002LL);
    15 const unicode_block B_LATIN_EXTENDED_A_BLOCK(               /* 0100 - 017F          */  0x0000000000000000LL, 0x0000000000000004LL);
    16 const unicode_block B_LATIN_EXTENDED_B_BLOCK(               /* 0180 - 024F          */  0x0000000000000000LL, 0x0000000000000008LL);
    17 const unicode_block B_IPA_EXTENSIONS_BLOCK(                 /* 0250 - 02AF          */  0x0000000000000000LL, 0x0000000000000010LL);
    18 const unicode_block B_SPACING_MODIFIER_LETTERS_BLOCK(       /* 02B0 - 02FF          */  0x0000000000000000LL, 0x0000000000000020LL);
    19 const unicode_block B_COMBINING_DIACRITICAL_MARKS_BLOCK(    /* 0300 - 036F          */  0x0000000000000000LL, 0x0000000000000040LL);
    20 const unicode_block B_BASIC_GREEK_BLOCK(                    /* 0370 - 03CF          */  0x0000000000000000LL, 0x0000000000000080LL);
    21 const unicode_block B_GREEK_SYMBOLS_AND_COPTIC_BLOCK(       /* 03D0 - 03FF          */  0x0000000000000000LL, 0x0000000000000100LL);
    22 const unicode_block B_CYRILLIC_BLOCK(                       /* 0400 - 04FF          */  0x0000000000000000LL, 0x0000000000000200LL);
    23 const unicode_block B_ARMENIAN_BLOCK(                       /* 0530 - 058F          */  0x0000000000000000LL, 0x0000000000000400LL);
    24 const unicode_block B_BASIC_HEBREW_BLOCK(                   /* 0590 - 05CF          */  0x0000000000000000LL, 0x0000000000000800LL);
    25 const unicode_block B_HEBREW_EXTENDED_BLOCK(                /* 05D0 - 05FF          */  0x0000000000000000LL, 0x0000000000001000LL);
    26 const unicode_block B_BASIC_ARABIC_BLOCK(                   /* 0600 - 0670          */  0x0000000000000000LL, 0x0000000000002000LL);
    27 const unicode_block B_ARABIC_EXTENDED_BLOCK(                /* 0671 - 06FF          */  0x0000000000000000LL, 0x0000000000004000LL);
    28 const unicode_block B_DEVANAGARI_BLOCK(                     /* 0900 - 097F          */  0x0000000000000000LL, 0x0000000000008000LL);
    29 const unicode_block B_BENGALI_BLOCK(                        /* 0980 - 09FF          */  0x0000000000000000LL, 0x0000000000010000LL);
    30 const unicode_block B_GURMUKHI_BLOCK(                       /* 0A00 - 0A7F          */  0x0000000000000000LL, 0x0000000000020000LL);
    31 const unicode_block B_GUJARATI_BLOCK(                       /* 0A80 - 0AFF          */  0x0000000000000000LL, 0x0000000000040000LL);
    32 const unicode_block B_ORIYA_BLOCK(                          /* 0B00 - 0B7F          */  0x0000000000000000LL, 0x0000000000080000LL);
    33 const unicode_block B_TAMIL_BLOCK(                          /* 0B80 - 0BFF          */  0x0000000000000000LL, 0x0000000000100000LL);
    34 const unicode_block B_TELUGU_BLOCK(                         /* 0C00 - 0C7F          */  0x0000000000000000LL, 0x0000000000200000LL);
    35 const unicode_block B_KANNADA_BLOCK(                        /* 0C80 - 0CFF          */  0x0000000000000000LL, 0x0000000000400000LL);
    36 const unicode_block B_MALAYALAM_BLOCK(                      /* 0D00 - 0D7F          */  0x0000000000000000LL, 0x0000000000800000LL);
    37 const unicode_block B_THAI_BLOCK(                           /* 0E00 - 0E7F          */  0x0000000000000000LL, 0x0000000001000000LL);
    38 const unicode_block B_LAO_BLOCK(                            /* 0E80 - 0EFF          */  0x0000000000000000LL, 0x0000000002000000LL);
    39 const unicode_block B_BASIC_GEORGIAN_BLOCK(                 /* 10A0 - 10CF          */  0x0000000000000000LL, 0x0000000004000000LL);
    40 const unicode_block B_GEORGIAN_EXTENDED_BLOCK(              /* 10D0 - 10FF          */  0x0000000000000000LL, 0x0000000008000000LL);
    41 const unicode_block B_HANGUL_JAMO_BLOCK(                    /* 1100 - 11FF          */  0x0000000000000000LL, 0x0000000010000000LL);
    42 const unicode_block B_LATIN_EXTENDED_ADDITIONAL_BLOCK(      /* 1E00 - 1EFF          */  0x0000000000000000LL, 0x0000000020000000LL);
    43 const unicode_block B_GREEK_EXTENDED_BLOCK(                 /* 1F00 - 1FFF          */  0x0000000000000000LL, 0x0000000040000000LL);
    44 const unicode_block B_GENERAL_PUNCTUATION_BLOCK(            /* 2000 - 206F          */  0x0000000000000000LL, 0x0000000080000000LL);
    45 const unicode_block B_SUPERSCRIPTS_AND_SUBSCRIPTS_BLOCK(    /* 2070 - 209F          */  0x0000000000000000LL, 0x0000000100000000LL);
    46 const unicode_block B_CURRENCY_SYMBOLS_BLOCK(               /* 20A0 - 20CF          */  0x0000000000000000LL, 0x0000000200000000LL);
    47 const unicode_block B_COMBINING_MARKS_FOR_SYMBOLS_BLOCK(    /* 20D0 - 20FF          */  0x0000000000000000LL, 0x0000000400000000LL);
    48 const unicode_block B_LETTERLIKE_SYMBOLS_BLOCK(             /* 2100 - 214F          */  0x0000000000000000LL, 0x0000000800000000LL);
    49 const unicode_block B_NUMBER_FORMS_BLOCK(                   /* 2150 - 218F          */  0x0000000000000000LL, 0x0000001000000000LL);
    50 const unicode_block B_ARROWS_BLOCK(                         /* 2190 - 21FF          */  0x0000000000000000LL, 0x0000002000000000LL);
    51 const unicode_block B_MATHEMATICAL_OPERATORS_BLOCK(         /* 2200 - 22FF          */  0x0000000000000000LL, 0x0000004000000000LL);
    52 const unicode_block B_MISCELLANEOUS_TECHNICAL_BLOCK(        /* 2300 - 23FF          */  0x0000000000000000LL, 0x0000008000000000LL);
    53 const unicode_block B_CONTROL_PICTURES_BLOCK(               /* 2400 - 243F          */  0x0000000000000000LL, 0x0000010000000000LL);
    54 const unicode_block B_OPTICAL_CHARACTER_RECOGNITION_BLOCK(  /* 2440 - 245F          */  0x0000000000000000LL, 0x0000020000000000LL);
    55 const unicode_block B_ENCLOSED_ALPHANUMERICS_BLOCK(         /* 2460 - 24FF          */  0x0000000000000000LL, 0x0000040000000000LL);
    56 const unicode_block B_BOX_DRAWING_BLOCK(                    /* 2500 - 257F          */  0x0000000000000000LL, 0x0000080000000000LL);
    57 const unicode_block B_BLOCK_ELEMENTS_BLOCK(                 /* 2580 - 259F          */  0x0000000000000000LL, 0x0000100000000000LL);
    58 const unicode_block B_GEOMETRIC_SHAPES_BLOCK(               /* 25A0 - 25FF          */  0x0000000000000000LL, 0x0000200000000000LL);
    59 const unicode_block B_MISCELLANEOUS_SYMBOLS_BLOCK(          /* 2600 - 26FF          */  0x0000000000000000LL, 0x0000400000000000LL);
    60 const unicode_block B_DINGBATS_BLOCK(                       /* 2700 - 27BF          */  0x0000000000000000LL, 0x0000800000000000LL);
    61 const unicode_block B_CJK_SYMBOLS_AND_PUNCTUATION_BLOCK(    /* 3000 - 303F          */  0x0000000000000000LL, 0x0001000000000000LL);
    62 const unicode_block B_HIRAGANA_BLOCK(                       /* 3040 - 309F          */  0x0000000000000000LL, 0x0002000000000000LL);
    63 const unicode_block B_KATAKANA_BLOCK(                       /* 30A0 - 30FF          */  0x0000000000000000LL, 0x0004000000000000LL);
    64 const unicode_block B_BOPOMOFO_BLOCK(                       /* 3100 - 312F          */  0x0000000000000000LL, 0x0008000000000000LL);
    65 const unicode_block B_HANGUL_COMPATIBILITY_JAMO_BLOCK(      /* 3130 - 318F          */  0x0000000000000000LL, 0x0010000000000000LL);
    66 const unicode_block B_CJK_MISCELLANEOUS_BLOCK(              /* 3190 - 319F          */  0x0000000000000000LL, 0x0020000000000000LL);
    67 const unicode_block B_ENCLOSED_CJK_LETTERS_AND_MONTHS_BLOCK(/* 3200 - 32FF          */  0x0000000000000000LL, 0x0040000000000000LL);
    68 const unicode_block B_CJK_COMPATIBILITY_BLOCK(              /* 3300 - 33FF          */  0x0000000000000000LL, 0x0080000000000000LL);
    69 const unicode_block B_HANGUL_BLOCK(                         /* AC00 - D7AF          */  0x0000000000000000LL, 0x0100000000000000LL);
    70 const unicode_block B_HIGH_SURROGATES_BLOCK(                /* D800 - DBFF          */  0x0000000000000000LL, 0x0200000000000000LL);
    71 const unicode_block B_LOW_SURROGATES_BLOCK(                 /* DC00 - DFFF          */  0x0000000000000000LL, 0x0400000000000000LL);
    72 const unicode_block B_CJK_UNIFIED_IDEOGRAPHS_BLOCK(         /* 4E00 - 9FFF          */  0x0000000000000000LL, 0x0800000000000000LL);
    73 const unicode_block B_PRIVATE_USE_AREA_BLOCK(               /* E000 - F8FF          */  0x0000000000000000LL, 0x1000000000000000LL);
    74 const unicode_block B_CJK_COMPATIBILITY_IDEOGRAPHS_BLOCK(   /* F900 - FAFF          */  0x0000000000000000LL, 0x2000000000000000LL);
    75 const unicode_block B_ALPHABETIC_PRESENTATION_FORMS_BLOCK(  /* FB00 - FB4F          */  0x0000000000000000LL, 0x4000000000000000LL);
    76 const unicode_block B_ARABIC_PRESENTATION_FORMS_A_BLOCK(    /* FB50 - FDFF          */  0x0000000000000000LL, 0x8000000000000000LL);
    77 const unicode_block B_COMBINING_HALF_MARKS_BLOCK(           /* FE20 - FE2F          */  0x0000000000000001LL, 0x0000000000000000LL);
    78 const unicode_block B_CJK_COMPATIBILITY_FORMS_BLOCK(        /* FE30 - FE4F          */  0x0000000000000002LL, 0x0000000000000000LL);
    79 const unicode_block B_SMALL_FORM_VARIANTS_BLOCK(            /* FE50 - FE6F          */  0x0000000000000004LL, 0x0000000000000000LL);
    80 const unicode_block B_ARABIC_PRESENTATION_FORMS_B_BLOCK(    /* FE70 - FEFE          */  0x0000000000000008LL, 0x0000000000000000LL);
    81 const unicode_block B_HALFWIDTH_AND_FULLWIDTH_FORMS_BLOCK(  /* FF00 - FFEF          */  0x0000000000000010LL, 0x0000000000000000LL);
    82 const unicode_block B_SPECIALS_BLOCK(                       /* FEFF and FFF0 - FFFF */  0x0000000000000020LL, 0x0000000000000000LL);
    83 const unicode_block B_TIBETAN_BLOCK(                        /* 0F00 - 0FBF          */  0x0000000000000040LL, 0x0000000000000000LL);
     11const unicode_block B_BASIC_LATIN_BLOCK(                    /* 0000 - 007F          */  0LL, 0LL, 0LL, 1LL      );
     12const unicode_block B_LATIN1_SUPPLEMENT_BLOCK(              /* 0080 - 00FF          */  0LL, 0LL, 0LL, 1LL <<  1);
     13const unicode_block B_LATIN_EXTENDED_A_BLOCK(               /* 0100 - 017F          */  0LL, 0LL, 0LL, 1LL <<  2);
     14const unicode_block B_LATIN_EXTENDED_B_BLOCK(               /* 0180 - 024F          */  0LL, 0LL, 0LL, 1LL <<  3);
     15const unicode_block B_IPA_EXTENSIONS_BLOCK(                 /* 0250 - 02AF          */  0LL, 0LL, 0LL, 1LL <<  4);
     16const unicode_block B_SPACING_MODIFIER_LETTERS_BLOCK(       /* 02B0 - 02FF          */  0LL, 0LL, 0LL, 1LL <<  5);
     17const unicode_block B_COMBINING_DIACRITICAL_MARKS_BLOCK(    /* 0300 - 036F          */  0LL, 0LL, 0LL, 1LL <<  6);
     18const unicode_block B_BASIC_GREEK_BLOCK(                    /* 0370 - 03FF          */  0LL, 0LL, 0LL, 1LL <<  7);
     19// this is the same as the B_BASIC_GREEK_BLOCK - added for compatibility at the moment
     20const unicode_block B_GREEK_SYMBOLS_AND_COPTIC_BLOCK(       /* 0370 - 03FF          */  0LL, 0LL, 0LL, 1LL <<  7);                       
     21const unicode_block B_CYRILLIC_BLOCK(                       /* 0400 - 04FF          */  0LL, 0LL, 0LL, 1LL <<  8);
     22const unicode_block B_ARMENIAN_BLOCK(                       /* 0530 - 058F          */  0LL, 0LL, 0LL, 1LL <<  9);
     23const unicode_block B_BASIC_HEBREW_BLOCK(                   /* 0590 - 05CF          */  0LL, 0LL, 0LL, 1LL << 10);
     24const unicode_block B_HEBREW_EXTENDED_BLOCK(                /* 05D0 - 05FF          */  0LL, 0LL, 0LL, 1LL << 11);
     25const unicode_block B_BASIC_ARABIC_BLOCK(                   /* 0600 - 0670          */  0LL, 0LL, 0LL, 1LL << 12);
     26const unicode_block B_ARABIC_EXTENDED_BLOCK(                /* 0671 - 06FF          */  0LL, 0LL, 0LL, 1LL << 13);
     27const unicode_block B_DEVANAGARI_BLOCK(                     /* 0900 - 097F          */  0LL, 0LL, 0LL, 1LL << 14);
     28const unicode_block B_BENGALI_BLOCK(                        /* 0980 - 09FF          */  0LL, 0LL, 0LL, 1LL << 15);
     29const unicode_block B_GURMUKHI_BLOCK(                       /* 0A00 - 0A7F          */  0LL, 0LL, 0LL, 1LL << 16);
     30const unicode_block B_GUJARATI_BLOCK(                       /* 0A80 - 0AFF          */  0LL, 0LL, 0LL, 1LL << 17);
     31const unicode_block B_ORIYA_BLOCK(                          /* 0B00 - 0B7F          */  0LL, 0LL, 0LL, 1LL << 18);
     32const unicode_block B_TAMIL_BLOCK(                          /* 0B80 - 0BFF          */  0LL, 0LL, 0LL, 1LL << 19);
     33const unicode_block B_TELUGU_BLOCK(                         /* 0C00 - 0C7F          */  0LL, 0LL, 0LL, 1LL << 20);
     34const unicode_block B_KANNADA_BLOCK(                        /* 0C80 - 0CFF          */  0LL, 0LL, 0LL, 1LL << 21);
     35const unicode_block B_MALAYALAM_BLOCK(                      /* 0D00 - 0D7F          */  0LL, 0LL, 0LL, 1LL << 22);
     36const unicode_block B_THAI_BLOCK(                           /* 0E00 - 0E7F          */  0LL, 0LL, 0LL, 1LL << 23);
     37const unicode_block B_LAO_BLOCK(                            /* 0E80 - 0EFF          */  0LL, 0LL, 0LL, 1LL << 24);
     38const unicode_block B_BASIC_GEORGIAN_BLOCK(                 /* 10A0 - 10CF          */  0LL, 0LL, 0LL, 1LL << 25);
     39const unicode_block B_GEORGIAN_EXTENDED_BLOCK(              /* 10D0 - 10FF          */  0LL, 0LL, 0LL, 1LL << 26);
     40const unicode_block B_HANGUL_JAMO_BLOCK(                    /* 1100 - 11FF          */  0LL, 0LL, 0LL, 1LL << 27);
     41const unicode_block B_LATIN_EXTENDED_ADDITIONAL_BLOCK(      /* 1E00 - 1EFF          */  0LL, 0LL, 0LL, 1LL << 28);
     42const unicode_block B_GREEK_EXTENDED_BLOCK(                 /* 1F00 - 1FFF          */  0LL, 0LL, 0LL, 1LL << 29);
     43const unicode_block B_GENERAL_PUNCTUATION_BLOCK(            /* 2000 - 206F          */  0LL, 0LL, 0LL, 1LL << 30);
     44const unicode_block B_SUPERSCRIPTS_AND_SUBSCRIPTS_BLOCK(    /* 2070 - 209F          */  0LL, 0LL, 0LL, 1LL << 31);
     45const unicode_block B_CURRENCY_SYMBOLS_BLOCK(               /* 20A0 - 20CF          */  0LL, 0LL, 0LL, 1LL << 32);
     46const unicode_block B_COMBINING_MARKS_FOR_SYMBOLS_BLOCK(    /* 20D0 - 20FF          */  0LL, 0LL, 0LL, 1LL << 33);
     47const unicode_block B_LETTERLIKE_SYMBOLS_BLOCK(             /* 2100 - 214F          */  0LL, 0LL, 0LL, 1LL << 34);
     48const unicode_block B_NUMBER_FORMS_BLOCK(                   /* 2150 - 218F          */  0LL, 0LL, 0LL, 1LL << 35);
     49const unicode_block B_ARROWS_BLOCK(                         /* 2190 - 21FF          */  0LL, 0LL, 0LL, 1LL << 36);
     50const unicode_block B_MATHEMATICAL_OPERATORS_BLOCK(         /* 2200 - 22FF          */  0LL, 0LL, 0LL, 1LL << 37);
     51const unicode_block B_MISCELLANEOUS_TECHNICAL_BLOCK(        /* 2300 - 23FF          */  0LL, 0LL, 0LL, 1LL << 38);
     52const unicode_block B_CONTROL_PICTURES_BLOCK(               /* 2400 - 243F          */  0LL, 0LL, 0LL, 1LL << 39);
     53const unicode_block B_OPTICAL_CHARACTER_RECOGNITION_BLOCK(  /* 2440 - 245F          */  0LL, 0LL, 0LL, 1LL << 40);
     54const unicode_block B_ENCLOSED_ALPHANUMERICS_BLOCK(         /* 2460 - 24FF          */  0LL, 0LL, 0LL, 1LL << 41);
     55const unicode_block B_BOX_DRAWING_BLOCK(                    /* 2500 - 257F          */  0LL, 0LL, 0LL, 1LL << 42);
     56const unicode_block B_BLOCK_ELEMENTS_BLOCK(                 /* 2580 - 259F          */  0LL, 0LL, 0LL, 1LL << 43);
     57const unicode_block B_GEOMETRIC_SHAPES_BLOCK(               /* 25A0 - 25FF          */  0LL, 0LL, 0LL, 1LL << 44);
     58const unicode_block B_MISCELLANEOUS_SYMBOLS_BLOCK(          /* 2600 - 26FF          */  0LL, 0LL, 0LL, 1LL << 45);
     59const unicode_block B_DINGBATS_BLOCK(                       /* 2700 - 27BF          */  0LL, 0LL, 0LL, 1LL << 46);
     60const unicode_block B_CJK_SYMBOLS_AND_PUNCTUATION_BLOCK(    /* 3000 - 303F          */  0LL, 0LL, 0LL, 1LL << 47);
     61const unicode_block B_HIRAGANA_BLOCK(                       /* 3040 - 309F          */  0LL, 0LL, 0LL, 1LL << 48);
     62const unicode_block B_KATAKANA_BLOCK(                       /* 30A0 - 30FF          */  0LL, 0LL, 0LL, 1LL << 49);
     63const unicode_block B_BOPOMOFO_BLOCK(                       /* 3100 - 312F          */  0LL, 0LL, 0LL, 1LL << 50);
     64const unicode_block B_HANGUL_COMPATIBILITY_JAMO_BLOCK(      /* 3130 - 318F          */  0LL, 0LL, 0LL, 1LL << 51);
     65const unicode_block B_CJK_MISCELLANEOUS_BLOCK(              /* 3190 - 319F          */  0LL, 0LL, 0LL, 1LL << 52);
     66const unicode_block B_ENCLOSED_CJK_LETTERS_AND_MONTHS_BLOCK(/* 3200 - 32FF          */  0LL, 0LL, 0LL, 1LL << 53);
     67const unicode_block B_CJK_COMPATIBILITY_BLOCK(              /* 3300 - 33FF          */  0LL, 0LL, 0LL, 1LL << 54);
     68const unicode_block B_HANGUL_BLOCK(                         /* AC00 - D7AF          */  0LL, 0LL, 0LL, 1LL << 55);
     69const unicode_block B_HIGH_SURROGATES_BLOCK(                /* D800 - DBFF          */  0LL, 0LL, 0LL, 1LL << 56);
     70const unicode_block B_LOW_SURROGATES_BLOCK(                 /* DC00 - DFFF          */  0LL, 0LL, 0LL, 1LL << 57);
     71const unicode_block B_CJK_UNIFIED_IDEOGRAPHS_BLOCK(         /* 4E00 - 9FFF          */  0LL, 0LL, 0LL, 1LL << 58);
     72const unicode_block B_PRIVATE_USE_AREA_BLOCK(               /* E000 - F8FF          */  0LL, 0LL, 0LL, 1LL << 59);
     73const unicode_block B_CJK_COMPATIBILITY_IDEOGRAPHS_BLOCK(   /* F900 - FAFF          */  0LL, 0LL, 0LL, 1LL << 60);
     74const unicode_block B_ALPHABETIC_PRESENTATION_FORMS_BLOCK(  /* FB00 - FB4F          */  0LL, 0LL, 0LL, 1LL << 61);
     75const unicode_block B_ARABIC_PRESENTATION_FORMS_A_BLOCK(    /* FB50 - FDFF          */  0LL, 0LL, 0LL, 1LL << 62);
     76const unicode_block B_COMBINING_HALF_MARKS_BLOCK(           /* FE20 - FE2F          */  0LL, 0LL, 0LL, 1LL << 63);
     77const unicode_block B_CJK_COMPATIBILITY_FORMS_BLOCK(        /* FE30 - FE4F          */  0LL, 0LL, 1LL      , 0LL);
     78const unicode_block B_SMALL_FORM_VARIANTS_BLOCK(            /* FE50 - FE6F          */  0LL, 0LL, 1LL <<  1, 0LL);
     79const unicode_block B_ARABIC_PRESENTATION_FORMS_B_BLOCK(    /* FE70 - FEFE          */  0LL, 0LL, 1LL <<  2, 0LL);
     80const unicode_block B_HALFWIDTH_AND_FULLWIDTH_FORMS_BLOCK(  /* FF00 - FFEF          */  0LL, 0LL, 1LL <<  3, 0LL);
     81const unicode_block B_SPECIALS_BLOCK(                       /* FEFF and FFF0 - FFFF */  0LL, 0LL, 1LL <<  4, 0LL);
     82const unicode_block B_TIBETAN_BLOCK(                        /* 0F00 - 0FBF          */  0LL, 0LL, 1LL <<  5, 0LL);
     83const unicode_block B_SYRIAC_BLOCK(                         /* 0700 - 074F          */  0LL, 0LL, 1LL <<  6, 0LL);
     84const unicode_block B_ARABIC_SUPPLEMENT_BLOCK(              /* 0750 - 077F          */  0LL, 0LL, 1LL <<  7, 0LL);
     85const unicode_block B_THAANA_BLOCK(                         /* 0780 - 07BF          */  0LL, 0LL, 1LL <<  8, 0LL);
     86const unicode_block B_N_KO_BLOCK(                           /* 07C0 - 07FF          */  0LL, 0LL, 1LL <<  9, 0LL);
     87const unicode_block B_SINHALA_BLOCK(                        /* 0D80 - 0DFF          */  0LL, 0LL, 1LL << 10, 0LL);
     88const unicode_block B_MYANMAR_BLOCK(                        /* 1000 - 109F          */  0LL, 0LL, 1LL << 11, 0LL);
     89const unicode_block B_ETHIOPIC_BLOCK(                       /* 1200 - 137F          */  0LL, 0LL, 1LL << 12, 0LL);
     90const unicode_block B_ETHIOPIC_SUPPLEMENT_BLOCK(            /* 1380 - 139F          */  0LL, 0LL, 1LL << 13, 0LL);
     91const unicode_block B_CHEROKEE_BLOCK(                       /* 13A0 - 13FF          */  0LL, 0LL, 1LL << 14, 0LL);
     92const unicode_block B_UNIFIED_CANADIAN_ABORIGINAL_BLOCK(    /* 1400 - 167F          */  0LL, 0LL, 1LL << 15, 0LL);
     93const unicode_block B_OGHAM_BLOCK(                          /* 1680 - 169F          */  0LL, 0LL, 1LL << 16, 0LL);
     94const unicode_block B_RUNIC_BLOCK(                          /* 16A0 - 16FF          */  0LL, 0LL, 1LL << 17, 0LL);
     95const unicode_block B_TAGALOG_BLOCK(                        /* 1700 - 171F          */  0LL, 0LL, 1LL << 18, 0LL);
     96const unicode_block B_HANUNOO_BLOCK(                        /* 1720 - 173F          */  0LL, 0LL, 1LL << 19, 0LL);
     97const unicode_block B_BUHID_BLOCK(                          /* 1740 - 175F          */  0LL, 0LL, 1LL << 20, 0LL);
     98const unicode_block B_TAGBANWA_BLOCK(                       /* 1760 - 177F          */  0LL, 0LL, 1LL << 21, 0LL);
     99const unicode_block B_KHMER_BLOCK(                          /* 1780 - 17FF          */  0LL, 0LL, 1LL << 22, 0LL);
     100const unicode_block B_MONGOLIAN_BLOCK(                      /* 1800 - 18AF          */  0LL, 0LL, 1LL << 23, 0LL);
     101const unicode_block B_LIMBU_BLOCK(                          /* 1900 - 194F          */  0LL, 0LL, 1LL << 24, 0LL);
     102const unicode_block B_TAI_LE_BLOCK(                         /* 1950 - 197F          */  0LL, 0LL, 1LL << 25, 0LL);
     103const unicode_block B_NEW_TAI_LUE_BLOCK(                    /* 1980 - 19DF          */  0LL, 0LL, 1LL << 26, 0LL);
     104const unicode_block B_KHMER_SYMBOLS_BLOCK(                  /* 19E0 - 19FF          */  0LL, 0LL, 1LL << 27, 0LL);
     105const unicode_block B_BUGINESE_BLOCK(                       /* 1A00 - 1A1F          */  0LL, 0LL, 1LL << 28, 0LL);
     106const unicode_block B_BALINESE_BLOCK(                       /* 1B00 - 1B7F          */  0LL, 0LL, 1LL << 29, 0LL);
     107const unicode_block B_SUNDANESE_BLOCK(                      /* 1B80 - 1BBF          */  0LL, 0LL, 1LL << 30, 0LL);
     108const unicode_block B_LEPCHA_BLOCK(                         /* 1C00 - 1C4F          */  0LL, 0LL, 1LL << 31, 0LL);
     109const unicode_block B_OL_CHIKI_BLOCK(                       /* 1C50 - 1C7F          */  0LL, 0LL, 1LL << 32, 0LL);
     110const unicode_block B_PHONETIC_EXTENSIONS_BLOCK(            /* 1D00 - 1D7F          */  0LL, 0LL, 1LL << 33, 0LL);
     111const unicode_block B_PHONETIC_EXTENSIONS_SUPPLEMENT_BLOCK( /* 1D80 - 1DBF          */  0LL, 0LL, 1LL << 34, 0LL);
     112const unicode_block B_COMBINING_MARKS_SUPPLEMENT_BLOCK(     /* 1DC0 - 1DFF          */  0LL, 0LL, 1LL << 35, 0LL);
     113const unicode_block B_MISC_MATHEMATICAL_SYMBOLS_A_BLOCK(    /* 27C0 - 27EF          */  0LL, 0LL, 1LL << 36, 0LL);
     114const unicode_block B_SUPPLEMENTAL_ARROWS_A_BLOCK(          /* 27F0 - 27FF          */  0LL, 0LL, 1LL << 37, 0LL);
     115const unicode_block B_BRAILLE_PATTERNS_BLOCK(               /* 2800 - 28FF          */  0LL, 0LL, 1LL << 38, 0LL);
     116const unicode_block B_SUPPLEMENTAL_ARROWS_B_BLOCK(          /* 2900 - 297F          */  0LL, 0LL, 1LL << 39, 0LL);
     117const unicode_block B_MISC_MATHEMATICAL_SYMBOLS_B_BLOCK(    /* 2980 - 29FF          */  0LL, 0LL, 1LL << 40, 0LL);
     118const unicode_block B_SUPPLEMENTAL_MATH_OPERATORS_BLOCK(    /* 2A00 - 2AFF          */  0LL, 0LL, 1LL << 41, 0LL);
     119const unicode_block B_MISC_SYMBOLS_AND_ARROWS_BLOCK(        /* 2B00 - 2BFF          */  0LL, 0LL, 1LL << 42, 0LL);
     120const unicode_block B_GLAGOTIC_BLOCK(                       /* 2C00 - 2C5F          */  0LL, 0LL, 1LL << 43, 0LL);
     121const unicode_block B_LATIN_EXTENDED_C_BLOCK(               /* 2C60 - 2C7F          */  0LL, 0LL, 1LL << 44, 0LL);
     122const unicode_block B_COPTIC_BLOCK(                         /* 2C80 - 2CFF          */  0LL, 0LL, 1LL << 45, 0LL);
     123const unicode_block B_GEORGIAN_SUPPLEMENT_BLOCK(            /* 2D00 - 2D2F          */  0LL, 0LL, 1LL << 46, 0LL);
     124const unicode_block B_TIFINAGH_BLOCK(                       /* 2D30 - 2D7F          */  0LL, 0LL, 1LL << 47, 0LL);
     125const unicode_block B_ETHIOPIC_EXTENDED_BLOCK(              /* 2D80 - 2DDF          */  0LL, 0LL, 1LL << 48, 0LL);
     126const unicode_block B_CYRILLIC_EXTENDED_A_BLOCK(            /* 2DE0 - 2DFF          */  0LL, 0LL, 1LL << 48, 0LL);
     127const unicode_block B_SUPPLEMENTAL_PUNCTUATION_BLOCK(       /* 2E00 - 2E7F          */  0LL, 0LL, 1LL << 49, 0LL);
     128const unicode_block B_CJK_RADICALS_SUPPLEMENT_BLOCK(        /* 2E80 - 2EFF          */  0LL, 0LL, 1LL << 50, 0LL);
     129const unicode_block B_KANGXI_RADICALS_BLOCK(                /* 2F00 - 2FDF          */  0LL, 0LL, 1LL << 51, 0LL);
     130const unicode_block B_IDEOGRAPHIC_DESCRIPTION_BLOCK(        /* 2FF0 - 2FFF          */  0LL, 0LL, 1LL << 52, 0LL);
     131const unicode_block B_BOPOMOFO_EXTENDED_BLOCK(              /* 31A0 - 31BF          */  0LL, 0LL, 1LL << 53, 0LL);
     132const unicode_block B_CJK_STROKES_BLOCK(                    /* 31C0 - 31EF          */  0LL, 0LL, 1LL << 54, 0LL);
     133const unicode_block B_KATAKANA_PHONETIC_EXTENSIONS_BLOCK(   /* 31F0 - 31FF          */  0LL, 0LL, 1LL << 55, 0LL);
     134const unicode_block B_CJK_UNIFIED_IDEOGRAPHS_EXT_A_BLOCK(   /* 3400 - 4DBF          */  0LL, 0LL, 1LL << 56, 0LL);
     135const unicode_block B_YIJING_HEXAGRAM_SYMBOLS_BLOCK(        /* 4DC0 - 4DFF          */  0LL, 0LL, 1LL << 57, 0LL);
     136const unicode_block B_YI_SYLLABLES_BLOCK(                   /* A000 - A48F          */  0LL, 0LL, 1LL << 58, 0LL);
     137const unicode_block B_YI_RADICALS_BLOCK(                    /* A490 - A4CF          */  0LL, 0LL, 1LL << 59, 0LL);
     138const unicode_block B_VAI_BLOCK(                            /* A500 - A63F          */  0LL, 0LL, 1LL << 60, 0LL);
     139const unicode_block B_CYRILLIC_EXTENDED_B_BLOCK(            /* A640 - A69F          */  0LL, 0LL, 1LL << 61, 0LL);
     140const unicode_block B_MODIFIER_TONE_LETTERS_BLOCK(          /* A700 - A71F          */  0LL, 0LL, 1LL << 62, 0LL);
     141const unicode_block B_LATIN_EXTENDED_D_BLOCK(               /* A720 - A7FF          */  0LL, 0LL, 1LL << 63, 0LL);
     142const unicode_block B_SYLOTI_NAGRI_BLOCK(                   /* A800 - A82F          */  0LL, 1LL      , 0LL, 0LL);
     143const unicode_block B_PHAGS_PA_BLOCK(                       /* A840 - A87F          */  0LL, 1LL <<  1, 0LL, 0LL);
     144const unicode_block B_SAURASHTRA_BLOCK(                     /* A880 - A8DF          */  0LL, 1LL <<  2, 0LL, 0LL);
     145const unicode_block B_KAYAH_LI_BLOCK(                       /* A900 - A92F          */  0LL, 1LL <<  3, 0LL, 0LL);
     146const unicode_block B_REJANG_BLOCK(                         /* A930 - A95F          */  0LL, 1LL <<  4, 0LL, 0LL);
     147const unicode_block B_CHAM_BLOCK(                           /* AA00 - AA5F          */  0LL, 1LL <<  5, 0LL, 0LL);
     148const unicode_block B_HANGUL_SYLLABLES_BLOCK(               /* AC00 - D7AF          */  0LL, 1LL <<  6, 0LL, 0LL);
     149const unicode_block B_VARIATION_SELECTORS_BLOCK(            /* FE00 - FE0F          */  0LL, 1LL <<  7, 0LL, 0LL);
     150const unicode_block B_VERTICAL_FORMS_BLOCK(                 /* FE10 - FE1F          */  0LL, 1LL <<  8, 0LL, 0LL);
     151const unicode_block B_LINEAR_B_SYLLABARY_BLOCK(             /* 10000 - 1007F        */  0LL, 1LL <<  9, 0LL, 0LL);
     152const unicode_block B_LINEAR_B_IDEOGRAMS_BLOCK(             /* 10080 - 100FF        */  0LL, 1LL << 10, 0LL, 0LL);
     153const unicode_block B_AEGEAN_NUMBERS_BLOCK(                 /* 10100 - 1013F        */  0LL, 1LL << 11, 0LL, 0LL);
     154const unicode_block B_ANCIENT_GREEK_NUMBERS_BLOCK(          /* 10140 - 1018F        */  0LL, 1LL << 12, 0LL, 0LL);
     155const unicode_block B_ANCIENT_SYMBOLS_BLOCK(                /* 10190 - 101CF        */  0LL, 1LL << 13, 0LL, 0LL);
     156const unicode_block B_PHAISTOS_DISC_BLOCK(                  /* 101D0 - 101FF        */  0LL, 1LL << 14, 0LL, 0LL);
     157const unicode_block B_LYCIAN_BLOCK(                         /* 10280 - 1029F        */  0LL, 1LL << 15, 0LL, 0LL);
     158const unicode_block B_CARIAN_BLOCK(                         /* 102A0 - 102DF        */  0LL, 1LL << 16, 0LL, 0LL);
     159const unicode_block B_OLD_ITALIC_BLOCK(                     /* 10300 - 1032F        */  0LL, 1LL << 17, 0LL, 0LL);
     160const unicode_block B_GOTHIC_BLOCK(                         /* 10330 - 1034F        */  0LL, 1LL << 18, 0LL, 0LL);
     161const unicode_block B_UGARITIC_BLOCK(                       /* 10380 - 1039F        */  0LL, 1LL << 19, 0LL, 0LL);
     162const unicode_block B_OLD_PERSIAN_BLOCK(                    /* 103A0 - 103DF        */  0LL, 1LL << 20, 0LL, 0LL);
     163const unicode_block B_DESERET_BLOCK(                        /* 10400 - 1044F        */  0LL, 1LL << 21, 0LL, 0LL);
     164const unicode_block B_SHAVIAN_BLOCK(                        /* 10450 - 1047F        */  0LL, 1LL << 22, 0LL, 0LL);
     165const unicode_block B_OSMANYA_BLOCK(                        /* 10480 - 104AF        */  0LL, 1LL << 23, 0LL, 0LL);
     166const unicode_block B_CYPRIOT_SYLLABARY_BLOCK(              /* 10800 - 1083F        */  0LL, 1LL << 24, 0LL, 0LL);
     167const unicode_block B_PHOENICIAN_BLOCK(                     /* 10900 - 1091F        */  0LL, 1LL << 25, 0LL, 0LL);
     168const unicode_block B_LYDIAN_BLOCK(                         /* 10920 - 1093F        */  0LL, 1LL << 26, 0LL, 0LL);
     169const unicode_block B_KHAROSHTHI_BLOCK(                     /* 10A00 - 10A5F        */  0LL, 1LL << 27, 0LL, 0LL);
     170const unicode_block B_CUNEIFORM_BLOCK(                      /* 12000 - 123FF        */  0LL, 1LL << 28, 0LL, 0LL);
     171const unicode_block B_CUNEIFORM_NUMBERS_PUNCTUATION_BLOCK(  /* 12400 - 1247F        */  0LL, 1LL << 29, 0LL, 0LL);
     172const unicode_block B_BYZANTINE_MUSICAL_SYMBOLS_BLOCK(      /* 1D000 - 1D0FF        */  0LL, 1LL << 30, 0LL, 0LL);
     173const unicode_block B_MUSICAL_SYMBOLS_BLOCK(                /* 1D100 - 1D1FF        */  0LL, 1LL << 31, 0LL, 0LL);
     174const unicode_block B_ANCIENT_GREEK_MUSICAL_SYMBOLS_BLOCK(  /* 1D200 - 1D24F        */  0LL, 1LL << 32, 0LL, 0LL);
     175const unicode_block B_TAI_XUAN_JING_SYMBOLS_BLOCK(          /* 1D300 - 1D35F        */  0LL, 1LL << 33, 0LL, 0LL);
     176const unicode_block B_COUNTING_ROD_NUMERALS_BLOCK(          /* 1D360 - 1D37F        */  0LL, 1LL << 34, 0LL, 0LL);
     177const unicode_block B_MATHEMATICAL_ALPHANUM_SYMBOLS_BLOCK(  /* 1D400 - 1D7FF        */  0LL, 1LL << 35, 0LL, 0LL);
     178const unicode_block B_MAHJONG_TILES_BLOCK(                  /* 1F000 - 1F02F        */  0LL, 1LL << 36, 0LL, 0LL);
     179const unicode_block B_DOMINO_TILES_BLOCK(                   /* 1F030 - 1F09F        */  0LL, 1LL << 37, 0LL, 0LL);
     180const unicode_block B_CJK_UNIFIED_IDEOGRAPHS_EXT_B_BLOCK(   /* 20000 - 2A6DF        */  0LL, 1LL << 38, 0LL, 0LL);
     181const unicode_block B_CJK_IDEOGRAPHS_SUPPLEMENT_BLOCK(      /* 2F800 - 2FA1F        */  0LL, 1LL << 39, 0LL, 0LL);
     182const unicode_block B_TAGS_BLOCK(                           /* E0000 - E007F        */  0LL, 1LL << 40, 0LL, 0LL);
     183const unicode_block B_VARIATION_SELECTORS_SUPPLEMENT_BLOCK( /* E0100 - E01EF        */  0LL, 1LL << 41, 0LL, 0LL);
     184const unicode_block B_SUPPLEMENTARY_PRIVATE_USE_A_BLOCK(    /* F0000 - FFFFF        */  0LL, 1LL << 42, 0LL, 0LL);
     185const unicode_block B_SUPPLEMENTARY_PRIVATE_USE_B_BLOCK(    /* 100000 - 10FFFF      */  0LL, 1LL << 43, 0LL, 0LL);
     186const unicode_block B_CYRILLIC_SUPPLEMENT_BLOCK(            /* 0500 - 052F          */  0LL, 1LL << 44, 0LL, 0LL);
     187const unicode_block B_HIGH_PRIVATE_USE_SURROGATES_BLOCK(    /* DB80 - DBFF          */  0LL, 1LL << 45, 0LL, 0LL);
     188
     189
     190const unicode_block_range kUnicodeBlockMap[] = {
     191    {0x0000, 0x007f, B_BASIC_LATIN_BLOCK },
     192    {0x0080, 0x00ff, B_LATIN1_SUPPLEMENT_BLOCK },
     193    {0x0100, 0x017f, B_LATIN_EXTENDED_A_BLOCK },
     194    {0x0180, 0x024f, B_LATIN_EXTENDED_B_BLOCK },
     195    {0x0250, 0x02af, B_IPA_EXTENSIONS_BLOCK },
     196    {0x02b0, 0x02ff, B_SPACING_MODIFIER_LETTERS_BLOCK },
     197    {0x0300, 0x036f, B_COMBINING_DIACRITICAL_MARKS_BLOCK },
     198    {0x0370, 0x03ff, B_BASIC_GREEK_BLOCK },
     199    {0x0400, 0x04ff, B_CYRILLIC_BLOCK },
     200    {0x0500, 0x052f, B_CYRILLIC_SUPPLEMENT_BLOCK },
     201    {0x0530, 0x058f, B_ARMENIAN_BLOCK },
     202    {0x0590, 0x05cf, B_BASIC_HEBREW_BLOCK },
     203    {0x05d0, 0x05ff, B_HEBREW_EXTENDED_BLOCK },
     204    {0x0600, 0x0670, B_BASIC_ARABIC_BLOCK },
     205    {0x0671, 0x06ff, B_ARABIC_EXTENDED_BLOCK },
     206    {0x0700, 0x074f, B_SYRIAC_BLOCK },
     207    {0x0750, 0x077f, B_ARABIC_SUPPLEMENT_BLOCK },
     208    {0x0780, 0x07bf, B_THAANA_BLOCK },
     209    {0x07c0, 0x07ff, B_N_KO_BLOCK },
     210    {0x0900, 0x097f, B_DEVANAGARI_BLOCK },
     211    {0x0980, 0x09ff, B_BENGALI_BLOCK },
     212    {0x0a00, 0x0a7f, B_GURMUKHI_BLOCK },
     213    {0x0a80, 0x0aff, B_GUJARATI_BLOCK },
     214    {0x0b00, 0x0b7f, B_ORIYA_BLOCK },
     215    {0x0b80, 0x0bff, B_TAMIL_BLOCK },
     216    {0x0c00, 0x0c7f, B_TELUGU_BLOCK },
     217    {0x0c80, 0x0cff, B_KANNADA_BLOCK},
     218    {0x0d00, 0x0d7f, B_MALAYALAM_BLOCK},
     219    {0x0d80, 0x0dff, B_SINHALA_BLOCK},
     220    {0x0e00, 0x0e7f, B_THAI_BLOCK},
     221    {0x0e80, 0x0eff, B_LAO_BLOCK},
     222    {0x0f00, 0x0fff, B_TIBETAN_BLOCK},
     223    {0x1000, 0x109f, B_MYANMAR_BLOCK},
     224    {0x10a0, 0x10ff, B_BASIC_GEORGIAN_BLOCK},
     225    {0x1100, 0x11ff, B_HANGUL_JAMO_BLOCK},
     226    {0x1200, 0x137f, B_ETHIOPIC_BLOCK},
     227    {0x1380, 0x139f, B_ETHIOPIC_SUPPLEMENT_BLOCK},
     228    {0x13a0, 0x13ff, B_CHEROKEE_BLOCK},
     229    {0x1400, 0x167f, B_UNIFIED_CANADIAN_ABORIGINAL_BLOCK},
     230    {0x1680, 0x169f, B_OGHAM_BLOCK},
     231    {0x16a0, 0x16ff, B_RUNIC_BLOCK},
     232    {0x1700, 0x171f, B_TAGALOG_BLOCK},
     233    {0x1720, 0x173f, B_HANUNOO_BLOCK},
     234    {0x1740, 0x175f, B_BUHID_BLOCK},
     235    {0x1760, 0x177f, B_TAGBANWA_BLOCK},
     236    {0x1780, 0x17ff, B_KHMER_BLOCK},
     237    {0x1800, 0x18af, B_MONGOLIAN_BLOCK},
     238    {0x1900, 0x194f, B_LIMBU_BLOCK},
     239    {0x1950, 0x197f, B_TAI_LE_BLOCK},
     240    {0x1980, 0x19df, B_NEW_TAI_LUE_BLOCK},
     241    {0x19e0, 0x19ff, B_KHMER_SYMBOLS_BLOCK},
     242    {0x1a00, 0x1a1f, B_BUGINESE_BLOCK},
     243    {0x1b00, 0x1b7f, B_BALINESE_BLOCK},
     244    {0x1b80, 0x1bbf, B_SUNDANESE_BLOCK},
     245    {0x1c00, 0x1c4f, B_LEPCHA_BLOCK},
     246    {0x1c50, 0x1c7f, B_OL_CHIKI_BLOCK},
     247    {0x1d00, 0x1d7f, B_PHONETIC_EXTENSIONS_BLOCK},
     248    {0x1d80, 0x1dbf, B_PHONETIC_EXTENSIONS_SUPPLEMENT_BLOCK},
     249    {0x1dc0, 0x1dff, B_COMBINING_MARKS_SUPPLEMENT_BLOCK},
     250    {0x1e00, 0x1eff, B_LATIN_EXTENDED_ADDITIONAL_BLOCK},
     251    {0x1f00, 0x1fff, B_GREEK_EXTENDED_BLOCK},
     252    {0x2000, 0x206f, B_GENERAL_PUNCTUATION_BLOCK},
     253    {0x2070, 0x209f, B_SUPERSCRIPTS_AND_SUBSCRIPTS_BLOCK},
     254    {0x20a0, 0x20cf, B_CURRENCY_SYMBOLS_BLOCK},
     255    {0x20d0, 0x20ff, B_COMBINING_MARKS_FOR_SYMBOLS_BLOCK},
     256    {0x2100, 0x214f, B_LETTERLIKE_SYMBOLS_BLOCK},
     257    {0x2150, 0x218f, B_NUMBER_FORMS_BLOCK},
     258    {0x2190, 0x21ff, B_ARROWS_BLOCK},
     259    {0x2200, 0x22ff, B_MATHEMATICAL_OPERATORS_BLOCK},
     260    {0x2300, 0x23ff, B_MISCELLANEOUS_TECHNICAL_BLOCK},
     261    {0x2400, 0x243f, B_CONTROL_PICTURES_BLOCK},
     262    {0x2440, 0x245f, B_OPTICAL_CHARACTER_RECOGNITION_BLOCK},
     263    {0x2460, 0x24ff, B_ENCLOSED_ALPHANUMERICS_BLOCK},
     264    {0x2500, 0x257f, B_BOX_DRAWING_BLOCK},
     265    {0x2580, 0x259f, B_BLOCK_ELEMENTS_BLOCK},
     266    {0x25a0, 0x25ff, B_GEOMETRIC_SHAPES_BLOCK},
     267    {0x2600, 0x26ff, B_MISCELLANEOUS_SYMBOLS_BLOCK},
     268    {0x2700, 0x27bf, B_DINGBATS_BLOCK},
     269    {0x27c0, 0x27ef, B_MISC_MATHEMATICAL_SYMBOLS_A_BLOCK},
     270    {0x27f0, 0x27ff, B_SUPPLEMENTAL_ARROWS_A_BLOCK},
     271    {0x2800, 0x28ff, B_BRAILLE_PATTERNS_BLOCK},
     272    {0x2900, 0x297f, B_SUPPLEMENTAL_ARROWS_B_BLOCK},
     273    {0x2980, 0x29ff, B_MISC_MATHEMATICAL_SYMBOLS_B_BLOCK},
     274    {0x2a00, 0x2aff, B_SUPPLEMENTAL_MATH_OPERATORS_BLOCK},
     275    {0x2b00, 0x2bff, B_MISC_SYMBOLS_AND_ARROWS_BLOCK},
     276    {0x2c00, 0x2c5f, B_GLAGOTIC_BLOCK},
     277    {0x2c60, 0x2c7f, B_LATIN_EXTENDED_C_BLOCK},
     278    {0x2c80, 0x2cff, B_COPTIC_BLOCK},
     279    {0x2d00, 0x2d2f, B_GEORGIAN_SUPPLEMENT_BLOCK},
     280    {0x2d30, 0x2d7f, B_TIFINAGH_BLOCK},
     281    {0x2d80, 0x2ddf, B_ETHIOPIC_EXTENDED_BLOCK},
     282    {0x2de0, 0x2dff, B_CYRILLIC_EXTENDED_A_BLOCK},
     283    {0x2e00, 0x2e7f, B_SUPPLEMENTAL_PUNCTUATION_BLOCK},
     284    {0x2e80, 0x2eff, B_CJK_RADICALS_SUPPLEMENT_BLOCK},
     285    {0x2f00, 0x2fdf, B_KANGXI_RADICALS_BLOCK},
     286    {0x2ff0, 0x2fff, B_IDEOGRAPHIC_DESCRIPTION_BLOCK},
     287    {0x3000, 0x303f, B_CJK_SYMBOLS_AND_PUNCTUATION_BLOCK},
     288    {0x3040, 0x309f, B_HIRAGANA_BLOCK},
     289    {0x30a0, 0x30ff, B_KATAKANA_BLOCK},
     290    {0x3100, 0x312f, B_BOPOMOFO_BLOCK},
     291    {0x3130, 0x318f, B_HANGUL_COMPATIBILITY_JAMO_BLOCK},
     292    {0x3190, 0x319f, B_CJK_MISCELLANEOUS_BLOCK},
     293    {0x31a0, 0x31bf, B_BOPOMOFO_EXTENDED_BLOCK},
     294    {0x31c0, 0x31ef, B_CJK_STROKES_BLOCK},
     295    {0x31f0, 0x31ff, B_KATAKANA_PHONETIC_EXTENSIONS_BLOCK},
     296    {0x3200, 0x32ff, B_ENCLOSED_CJK_LETTERS_AND_MONTHS_BLOCK},
     297    {0x3300, 0x33ff, B_CJK_COMPATIBILITY_BLOCK},
     298    {0x3400, 0x4dbf, B_CJK_UNIFIED_IDEOGRAPHS_EXT_A_BLOCK},
     299    {0x4dc0, 0x4dff, B_YIJING_HEXAGRAM_SYMBOLS_BLOCK},
     300    {0x4e00, 0x9fff, B_CJK_UNIFIED_IDEOGRAPHS_BLOCK},
     301    {0xa000, 0xa48f, B_YI_SYLLABLES_BLOCK},
     302    {0xa490, 0xa4cf, B_YI_RADICALS_BLOCK},
     303    {0xa500, 0xa63f, B_VAI_BLOCK},
     304    {0xa640, 0xa69f, B_CYRILLIC_EXTENDED_B_BLOCK},
     305    {0xa700, 0xa71f, B_MODIFIER_TONE_LETTERS_BLOCK},
     306    {0xa720, 0xa7ff, B_LATIN_EXTENDED_D_BLOCK},
     307    {0xa800, 0xa82f, B_SYLOTI_NAGRI_BLOCK},
     308    {0xa840, 0xa87f, B_PHAGS_PA_BLOCK},
     309    {0xa880, 0xa8df, B_SAURASHTRA_BLOCK},
     310    {0xa900, 0xa92f, B_KAYAH_LI_BLOCK},
     311    {0xa930, 0xa95f, B_REJANG_BLOCK},
     312    {0xaa00, 0xaa5f, B_CHAM_BLOCK},
     313    {0xac00, 0xd7af, B_HANGUL_SYLLABLES_BLOCK},
     314    {0xd800, 0xdb7f, B_HIGH_SURROGATES_BLOCK},
     315    {0xdb80, 0xdbff, B_HIGH_PRIVATE_USE_SURROGATES_BLOCK},
     316    {0xdc00, 0xdfff, B_LOW_SURROGATES_BLOCK},
     317    {0xe000, 0xf8ff, B_PRIVATE_USE_AREA_BLOCK},
     318    {0xf900, 0xfaff, B_CJK_COMPATIBILITY_IDEOGRAPHS_BLOCK},
     319    {0xfb00, 0xfb4f, B_ALPHABETIC_PRESENTATION_FORMS_BLOCK},
     320    {0xfb50, 0xfdff, B_ARABIC_PRESENTATION_FORMS_A_BLOCK},
     321    {0xfe00, 0xfe0f, B_VARIATION_SELECTORS_BLOCK},
     322    {0xfe10, 0xfe1f, B_VERTICAL_FORMS_BLOCK},
     323    {0xfe20, 0xfe2f, B_COMBINING_HALF_MARKS_BLOCK},
     324    {0xfe30, 0xfe4f, B_CJK_COMPATIBILITY_FORMS_BLOCK},
     325    {0xfe50, 0xfe6f, B_SMALL_FORM_VARIANTS_BLOCK},
     326    {0xfe70, 0xfeff, B_ARABIC_PRESENTATION_FORMS_B_BLOCK},
     327    {0xff00, 0xffef, B_HALFWIDTH_AND_FULLWIDTH_FORMS_BLOCK},
     328    {0xfff0, 0xffff, B_SPECIALS_BLOCK},
     329    {0x010000, 0x01007f, B_LINEAR_B_SYLLABARY_BLOCK},
     330    {0x010080, 0x0100ff, B_LINEAR_B_IDEOGRAMS_BLOCK},
     331    {0x010100, 0x01013f, B_AEGEAN_NUMBERS_BLOCK},
     332    {0x010140, 0x01018f, B_ANCIENT_GREEK_NUMBERS_BLOCK},
     333    {0x010190, 0x0101cf, B_ANCIENT_SYMBOLS_BLOCK},
     334    {0x0101d0, 0x0101ff, B_PHAISTOS_DISC_BLOCK},
     335    {0x010280, 0x01029f, B_LYCIAN_BLOCK},
     336    {0x0102a0, 0x0102df, B_CARIAN_BLOCK},
     337    {0x010300, 0x01032f, B_OLD_ITALIC_BLOCK},
     338    {0x010330, 0x01034f, B_GOTHIC_BLOCK},
     339    {0x010380, 0x01039f, B_UGARITIC_BLOCK},
     340    {0x0103a0, 0x0103df, B_OLD_PERSIAN_BLOCK},
     341    {0x010400, 0x01044f, B_DESERET_BLOCK},
     342    {0x010450, 0x01047f, B_SHAVIAN_BLOCK},
     343    {0x010480, 0x0104af, B_OSMANYA_BLOCK},
     344    {0x010800, 0x01083f, B_CYPRIOT_SYLLABARY_BLOCK},
     345    {0x010900, 0x01091f, B_PHOENICIAN_BLOCK},
     346    {0x010920, 0x01093f, B_LYDIAN_BLOCK},
     347    {0x010a00, 0x010a5f, B_KHAROSHTHI_BLOCK},
     348    {0x012000, 0x0123ff, B_CUNEIFORM_BLOCK},
     349    {0x012400, 0x01247f, B_CUNEIFORM_NUMBERS_PUNCTUATION_BLOCK},
     350    {0x01d000, 0x01d0ff, B_BYZANTINE_MUSICAL_SYMBOLS_BLOCK},
     351    {0x01d100, 0x01d1ff, B_MUSICAL_SYMBOLS_BLOCK},
     352    {0x01d200, 0x01d24f, B_ANCIENT_GREEK_MUSICAL_SYMBOLS_BLOCK},
     353    {0x01d300, 0x01d35f, B_TAI_XUAN_JING_SYMBOLS_BLOCK},
     354    {0x01d360, 0x01d37f, B_COUNTING_ROD_NUMERALS_BLOCK},
     355    {0x01d400, 0x01d7ff, B_MATHEMATICAL_ALPHANUM_SYMBOLS_BLOCK},
     356    {0x01f000, 0x01f02f, B_MAHJONG_TILES_BLOCK},
     357    {0x01f030, 0x01f09f, B_DOMINO_TILES_BLOCK},
     358    {0x020000, 0x02a6df, B_CJK_UNIFIED_IDEOGRAPHS_EXT_B_BLOCK},
     359    {0x02f800, 0x02fa1f, B_CJK_IDEOGRAPHS_SUPPLEMENT_BLOCK},
     360    {0x0e0000, 0x0e007f, B_TAGS_BLOCK},
     361    {0x0e0100, 0x0e01ef, B_VARIATION_SELECTORS_SUPPLEMENT_BLOCK},
     362    {0x0f0000, 0x0fffff, B_SUPPLEMENTARY_PRIVATE_USE_A_BLOCK},
     363    {0x100000, 0x10ffff, B_SUPPLEMENTARY_PRIVATE_USE_B_BLOCK},
     364};
    84365
     366const uint32 kNumUnicodeBlockRanges
     367    = sizeof(kUnicodeBlockMap) / sizeof(kUnicodeBlockMap[0]);
     368   
    85369#endif  // _UNICODEBLOCKOBJECTS_H
  • headers/private/app/ServerProtocol.h

    diff --git a/headers/private/app/ServerProtocol.h b/headers/private/app/ServerProtocol.h
    index 73b0a7c..ec365f8 100644
    a b  
    11/*
    2  * Copyright 2001-2015, Haiku.
     2 * Copyright 2001-2016, Haiku.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
    enum {  
    143143    AS_GET_HAS_GLYPHS,
    144144    AS_GET_GLYPH_SHAPES,
    145145    AS_GET_TRUNCATED_STRINGS,
     146    AS_GET_UNICODE_BLOCKS,
    146147
    147148    // Screen methods
    148149    AS_VALID_SCREEN_ID,
  • src/kits/interface/Font.cpp

    diff --git a/src/kits/interface/Font.cpp b/src/kits/interface/Font.cpp
    index 804307f..296ffdf 100644
    a b BFont::BoundingBox() const  
    839839unicode_block
    840840BFont::Blocks() const
    841841{
    842     // TODO: Add Block support
    843     return unicode_block(~0LL, ~0LL);
     842    BPrivate::AppServerLink link;
     843    link.StartMessage(AS_GET_UNICODE_BLOCKS);
     844    link.Attach<uint16>(fFamilyID);
     845    link.Attach<uint16>(fStyleID);
     846   
     847    int32 status;
     848    if (link.FlushWithReply(status) != B_OK
     849        || status != B_OK) {
     850        return unicode_block(~0LL, ~0LL, ~0LL, ~0LL);
     851    }
     852   
     853    unicode_block blocksForFont;
     854    link.Read<unicode_block>(&blocksForFont);
     855   
     856    return blocksForFont;
    844857}
    845858
    846859
  • src/servers/app/Jamfile

    diff --git a/src/servers/app/Jamfile b/src/servers/app/Jamfile
    index 8f567ab..257dac6 100644
    a b local font_src =  
    3232    ;
    3333
    3434UseBuildFeatureHeaders freetype ;
     35UseBuildFeatureHeaders fontconfig ;
    3536Includes [ FGristFiles AppServer.cpp BitmapManager.cpp Canvas.cpp
    3637    ClientMemoryAllocator.cpp Desktop.cpp DesktopSettings.cpp
    3738    DrawState.cpp DrawingEngine.cpp Layer.cpp PictureBoundingBoxPlayer.cpp
    3839    ServerApp.cpp ServerBitmap.cpp ServerCursor.cpp ServerFont.cpp
    3940    ServerPicture.cpp ServerWindow.cpp View.cpp Window.cpp WorkspacesView.cpp
    4041    $(decorator_src) $(font_src) ]
    41     : [ BuildFeatureAttribute freetype : headers ] ;
     42    : [ BuildFeatureAttribute freetype : headers ]
     43      [ BuildFeatureAttribute fontconfig : headers ] ;
    4244
    4345
    4446local BROKEN_64 = ;
    Server app_server :  
    103105    libaslocal.a $(BROKEN_64)libasremote.a $(BROKEN_64)libashtml5.a
    104106    libasdrawing.a libpainter.a libagg.a
    105107    [ BuildFeatureAttribute freetype : library ]
     108    [ BuildFeatureAttribute fontconfig : library ]
    106109    libstackandtile.a liblinprog.a libtextencoding.so shared
    107110    [ TargetLibstdc++ ]
    108111
  • src/servers/app/ProfileMessageSupport.cpp

    diff --git a/src/servers/app/ProfileMessageSupport.cpp b/src/servers/app/ProfileMessageSupport.cpp
    index f48f3bd..b387b99 100644
    a b  
    11/*
    2  * Copyright 2007-2009, Haiku Inc. All rights reserved.
     2 * Copyright 2007-2016, Haiku Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
    string_for_message_code(uint32 code, BString& string)  
    125125        CODE(AS_GET_HAS_GLYPHS);
    126126        CODE(AS_GET_GLYPH_SHAPES);
    127127        CODE(AS_GET_TRUNCATED_STRINGS);
     128        CODE(AS_GET_UNICODE_BLOCKS);
    128129
    129130        // Screen methods
    130131        CODE(AS_VALID_SCREEN_ID);
  • src/servers/app/ServerApp.cpp

    diff --git a/src/servers/app/ServerApp.cpp b/src/servers/app/ServerApp.cpp
    index ec6432a..c2143a2 100644
    a b  
    11/*
    2  * Copyright 2001-2015, Haiku.
     2 * Copyright 2001-2016, Haiku.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
    ServerApp::_DispatchMessage(int32 code, BPrivate::LinkReceiver& link)  
    20222022            break;
    20232023        }
    20242024
     2025        case AS_GET_UNICODE_BLOCKS:
     2026        {
     2027            FTRACE(("ServerApp %s: AS_GET_UNICODE_BLOCKS\n", Signature()));
     2028           
     2029            // Attached Data:
     2030            // 1) uint16 family ID
     2031            // 2) uint16 style ID
     2032           
     2033            // Returns:
     2034            // 1) unicode_block - bitfield of Unicode blocks in font
     2035
     2036            uint16 familyID, styleID;
     2037            float size;
     2038            link.Read<uint16>(&familyID);
     2039            link.Read<uint16>(&styleID);
     2040            link.Read<float>(&size);
     2041
     2042            ServerFont font;
     2043            status_t status = font.SetFamilyAndStyle(familyID, styleID);
     2044            if (status == B_OK) {
     2045                unicode_block blocksForFont;
     2046                font.GetUnicodeBlocks(blocksForFont);
     2047               
     2048                fLink.Attach(&blocksForFont, sizeof(blocksForFont));
     2049            } else
     2050                fLink.StartMessage(status);
     2051
     2052            fLink.Flush();
     2053            break;
     2054        }
     2055           
    20252056        case AS_GET_GLYPH_SHAPES:
    20262057        {
    20272058            FTRACE(("ServerApp %s: AS_GET_GLYPH_SHAPES\n", Signature()));
  • src/servers/app/ServerFont.cpp

    diff --git a/src/servers/app/ServerFont.cpp b/src/servers/app/ServerFont.cpp
    index 5c0da75..58e6a84 100644
    a b  
    11/*
    2  * Copyright 2001-2014, Haiku.
     2 * Copyright 2001-2016, Haiku.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
     
    2222#include FT_GLYPH_H
    2323#include FT_OUTLINE_H
    2424
     25#include <fontconfig.h>
     26#include <fcfreetype.h>
     27
    2528#include <Shape.h>
    2629#include <String.h>
     30#include <UnicodeBlockObjects.h>
    2731#include <UTF8.h>
    2832
    2933#include <agg_bounding_rect.h>
    ServerFont::GetGlyphShapes(const char charArray[], int32 numChars,  
    432436}
    433437
    434438
     439void FindBlockForCodepoint(uint32 codePoint, unicode_block &blocksForMap)
     440{
     441    uint32 min = 0;
     442    uint32 max = kNumUnicodeBlockRanges;
     443   
     444    while (max >= min) {
     445        uint32 guess = (max + min) / 2;
     446        uint32 start = kUnicodeBlockMap[guess].start;
     447        uint32 end = kUnicodeBlockMap[guess].end;
     448       
     449        if (start <= codePoint && end >= codePoint) {
     450            blocksForMap = blocksForMap | kUnicodeBlockMap[guess].block;
     451            max = min;
     452        }
     453       
     454        if (end < codePoint) {
     455            min = guess + 1;
     456        } else {
     457            max = guess - 1;
     458        }
     459    }
     460}
     461
     462/*
     463    parses charmap from fontconfig.  See fontconfig docs for FcCharSetFirstPage
     464    and FcCharSetNextPage for details on format.
     465*/
     466void ParseFcMap(FcChar32 charMap[], FcChar32 baseCodePoint, unicode_block &blocksForMap)
     467{   
     468    for (int i=0; i<FC_CHARSET_MAP_SIZE; ++i)
     469    {
     470        int bit = 32;
     471        FcChar32 curVal = charMap[i];
     472        uint32 rangeStart = 0;
     473       
     474        while (bit > 0) {
     475            if (curVal & 0x8000) {
     476                if (rangeStart == 0) {
     477                    rangeStart = bit;
     478                }   
     479            } else if (rangeStart > 0) {
     480                uint32 startPoint = baseCodePoint + (32 * i) + (rangeStart-1);
     481                uint32 endPoint = baseCodePoint + (32 * i) + (bit-1);
     482               
     483                FindBlockForCodepoint(startPoint, blocksForMap);
     484                FindBlockForCodepoint(endPoint, blocksForMap);
     485                       
     486                rangeStart = 0;
     487            }
     488           
     489            curVal <<=1;
     490            --bit;
     491        }
     492    }
     493}
     494
     495/*!
     496    \brief Gets a bitmap that indicates which Unicode blocks are in the font.
     497    \param unicode_block to store bitmap in
     498    \return B_OK; bitmap will be empty if something went wrong
     499*/
     500status_t
     501ServerFont::GetUnicodeBlocks(unicode_block &blocksForFont)
     502{
     503    FT_Face face = GetTransformedFace(true, true);
     504   
     505    FcCharSet *charSet = FcFreeTypeCharSet(face, NULL);
     506    FcChar32 charMap[FC_CHARSET_MAP_SIZE];
     507    FcChar32 next = 0;
     508   
     509    FcChar32 baseCodePoint = FcCharSetFirstPage(charSet, charMap, &next);
     510   
     511    ParseFcMap(charMap, baseCodePoint, blocksForFont);
     512   
     513    while (next != FC_CHARSET_DONE) {
     514        baseCodePoint = FcCharSetNextPage(charSet, charMap, &next);
     515       
     516        ParseFcMap(charMap, baseCodePoint, blocksForFont);
     517    }
     518   
     519    return B_OK;
     520}
     521
     522
    435523class HasGlyphsConsumer {
    436524 public:
    437525    HasGlyphsConsumer(bool* hasArray)
  • src/servers/app/ServerFont.h

    diff --git a/src/servers/app/ServerFont.h b/src/servers/app/ServerFont.h
    index b04a7e3..9dd57f8 100644
    a b class ServerFont {  
    163163                                               float width) const;
    164164
    165165            Transformable       EmbeddedTransformation() const;
     166            status_t            GetUnicodeBlocks(unicode_block &blocksForFont);
    166167
    167168protected:
    168169    friend class FontStyle;