29 CharMap::iterator iter = mCharMap.find(_id);
31 if (iter != mCharMap.end())
34 return mSubstituteGlyphInfo;
37 void ResourceManualFont::loadTexture()
39 if (mTexture ==
nullptr)
43 if (mTexture ==
nullptr)
46 if (mTexture !=
nullptr)
59 if (node->
getName() ==
"Property")
63 if (key ==
"Source") mSource = value;
70 if (mTexture !=
nullptr)
72 int textureWidth = mTexture->
getWidth();
73 int textureHeight = mTexture->
getHeight();
81 while (element.
next(
"Code"))
88 if (value ==
"cursor")
90 else if (value ==
"selected")
92 else if (value ==
"selected_back")
94 else if (value ==
"substitute")
99 float advance(utility::parseValue<float>(element->
findAttribute(
"advance")));
106 std::string sizeString;
110 size = utility::parseValue<FloatSize>(sizeString);
114 advance = size.
width;
124 coord.
left / textureWidth,
125 coord.
top / textureHeight,
126 coord.
right() / textureWidth,
127 coord.
bottom() / textureHeight)
131 mSubstituteGlyphInfo = &glyphInfo;
146 return mDefaultHeight;
virtual void deserialization(xml::ElementPtr _node, Version _version)
int parseInt(const std::string &_value)
static RenderManager & getInstance()
virtual ITexture * getTexture(const std::string &_name)=0
unsigned int parseUInt(const std::string &_value)
bool findAttribute(const std::string &_name, std::string &_value)
virtual ITexture * getTextureFont()
virtual GlyphInfo * getGlyphInfo(Char _id)
virtual ~ResourceManualFont()
virtual int getHeight()=0
virtual void deserialization(xml::ElementPtr _node, Version _version)
ElementEnumerator getElementEnumerator()
const std::string & getName() const
virtual void loadFromFile(const std::string &_filename)=0
virtual ITexture * createTexture(const std::string &_name)=0
virtual int getDefaultHeight()