#define StandardFonts #ifdef XP_WIN # include "../thebes/StandardFonts-win10.inc" #elifdefined(XP_MACOSX) # include "../thebes/StandardFonts-macos.inc" #elifdefined(XP_LINUX) # include "../thebes/StandardFonts-linux.inc" #elifdefined(XP_ANDROID) # include "../thebes/StandardFonts-android.inc" #endif #undef StandardFonts
// Helper to collect FONT_RULE font names
std::vector<std::string> GetFontRuleNames() {
std::vector<std::string> fontRuleNames; #undef FONT_RULE #define FONT_RULE(fontName, ...) fontRuleNames.push_back(fontName); #define FontInclusionByLocaleRules
#ifdef XP_WIN # include "../thebes/StandardFonts-win10.inc" #elifdefined(XP_MACOSX) # include "../thebes/StandardFonts-macos.inc" #elifdefined(XP_LINUX) # include "../thebes/StandardFonts-linux.inc" #elifdefined(XP_ANDROID) # include "../thebes/StandardFonts-android.inc" #endif
TEST(StandardFontsTest, LangPackAndFontRuleNoOverlap)
{ // Get LangPack font names
std::set<std::string> langPackFonts; for (constchar* font : kLangPackFonts) {
langPackFonts.insert(font);
}
// Get FONT_RULE font names
std::vector<std::string> fontRuleNames = GetFontRuleNames();
// Check for overlap for (constauto& font : fontRuleNames) { auto it = std::find_if(langPackFonts.begin(), langPackFonts.end(),
[&font](const std::string& langPackFont) { return std::equal(
font.begin(), font.end(), langPackFont.begin(),
langPackFont.end(), [](char a, char b) { return tolower(a) == tolower(b);
});
});
ASSERT_EQ(it, langPackFonts.end())
<< "Font '" << font
<< "' is in both kLangPackFonts and FONT_RULE (case insensitive)";
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.