MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / getFontForCharacter

Method getFontForCharacter

source/rendering/StarFontTextureGroup.cpp:123–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123Font* FontTextureGroup::getFontForCharacter(String::Char c) {
124 if (((c >= 0x1F600 && c <= 0x1F64F) || // Emoticons
125 (c >= 0x1F300 && c <= 0x1F5FF) || // Misc Symbols and Pictographs
126 (c >= 0x1F680 && c <= 0x1F6FF) || // Transport and Map
127 (c >= 0x1F1E6 && c <= 0x1F1FF) || // Regional country flags
128 (c >= 0x2600 && c <= 0x26FF ) || // Misc symbols 9728 - 9983
129 (c >= 0x2700 && c <= 0x27BF ) || // Dingbats
130 (c >= 0xFE00 && c <= 0xFE0F ) || // Variation Selectors
131 (c >= 0x1F900 && c <= 0x1F9FF) || // Supplemental Symbols and Pictographs
132 (c >= 0x1F018 && c <= 0x1F270) || // Various asian characters
133 (c >= 65024 && c <= 65039 ) || // Variation selector
134 (c >= 9100 && c <= 9300 ) || // Misc items
135 (c >= 8400 && c <= 8447 ))&& // Combining Diacritical Marks for Symbols
136 m_emojiFont->exists(c)
137 )
138 return m_emojiFont.get();
139 else if (m_activeFont->exists(c) || !m_fallbackFont)
140 return m_activeFont.get();
141 else
142 return m_fallbackFont.get();
143}
144
145}

Callers

nothing calls this directly

Calls 2

existsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected