[core] Factored out default fonts
This commit is contained in:
committed by
Minh Nguyễn
parent
9b78a156de
commit
76ddb15dbc
@@ -66,6 +66,9 @@ constexpr uint32_t DEFAULT_MAXIMUM_CONCURRENT_REQUESTS = 20;
|
||||
|
||||
constexpr uint8_t TERRAIN_RGB_MAXZOOM = 15;
|
||||
|
||||
constexpr const char* LAST_RESORT_ALPHABETIC_FONT = "Open Sans Regular";
|
||||
constexpr const char* LAST_RESORT_PAN_UNICODE_FONT = "Arial Unicode MS Regular";
|
||||
|
||||
} // namespace util
|
||||
|
||||
namespace debug {
|
||||
|
||||
@@ -27,13 +27,11 @@ void SymbolLayer::Impl::populateFontStack(std::set<FontStack>& fontStack) const
|
||||
}
|
||||
|
||||
layout.get<TextFont>().match(
|
||||
[&fontStack] (Undefined) {
|
||||
fontStack.insert({"Open Sans Regular", "Arial Unicode MS Regular"});
|
||||
[&fontStack](Undefined) {
|
||||
fontStack.insert({util::LAST_RESORT_ALPHABETIC_FONT, util::LAST_RESORT_PAN_UNICODE_FONT});
|
||||
},
|
||||
[&fontStack] (const FontStack& constant) {
|
||||
fontStack.insert(constant);
|
||||
},
|
||||
[&] (const auto& function) {
|
||||
[&fontStack](const FontStack& constant) { fontStack.insert(constant); },
|
||||
[&](const auto& function) {
|
||||
for (const auto& value : function.possibleOutputs()) {
|
||||
if (value) {
|
||||
fontStack.insert(*value);
|
||||
@@ -42,8 +40,7 @@ void SymbolLayer::Impl::populateFontStack(std::set<FontStack>& fontStack) const
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
} // namespace style
|
||||
|
||||
Reference in New Issue
Block a user