| 920 | } |
| 921 | |
| 922 | int ResourceTrueTypeFont::createFaceGlyph( |
| 923 | FT_UInt _glyphIndex, |
| 924 | Char _codePoint, |
| 925 | int _fontAscent, |
| 926 | const FT_Face& _ftFace, |
| 927 | FT_Int32 _ftLoadFlags, |
| 928 | GlyphHeightMap& _glyphHeightMap) |
| 929 | { |
| 930 | if (mGlyphMap.find(_codePoint) == mGlyphMap.end()) |
| 931 | { |
| 932 | if (FT_Load_Glyph(_ftFace, _glyphIndex, _ftLoadFlags) == 0) |
| 933 | return createGlyph( |
| 934 | _glyphIndex, |
| 935 | createFaceGlyphInfo(_codePoint, _fontAscent, _ftFace->glyph), |
| 936 | _glyphHeightMap); |
| 937 | MYGUI_LOG( |
| 938 | Warning, |
| 939 | "ResourceTrueTypeFont: Cannot load glyph " |
| 940 | << _glyphIndex << " for character " << _codePoint << " in font '" << getResourceName() << "'."); |
| 941 | } |
| 942 | else |
| 943 | { |
| 944 | mCharMap[_codePoint] = _glyphIndex; |
| 945 | } |
| 946 | |
| 947 | return 0; |
| 948 | } |
| 949 | |
| 950 | template<bool LAMode, bool Antialias> |
| 951 | void ResourceTrueTypeFont::renderGlyphs( |