mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
Use Noto font, not ZCOOL, because it has a full set of Chinese glyphs
This commit is contained in:
parent
3019a6fff1
commit
fb78ec19cd
@ -1480,10 +1480,10 @@
|
||||
"uncompressed_size_bytes": 25964767,
|
||||
"compressed_size_bytes": 8714926
|
||||
},
|
||||
"data/system/extra_fonts/ZCOOLXiaoWei-Regular.ttf": {
|
||||
"checksum": "edea762b9f6ccee6d330ec37b6d1cd66",
|
||||
"uncompressed_size_bytes": 6302056,
|
||||
"compressed_size_bytes": 3409781
|
||||
"data/system/extra_fonts/NotoSerifCJKtc-Regular.otf": {
|
||||
"checksum": "338584d1454293b6dfd84a9137153b3c",
|
||||
"uncompressed_size_bytes": 23614420,
|
||||
"compressed_size_bytes": 19085911
|
||||
},
|
||||
"data/system/fr/charleville_mezieres/city.bin": {
|
||||
"checksum": "a283fcc74ca4d6d2b471204440a7a20f",
|
||||
|
BIN
data/system/extra_fonts/NotoSerifCJKtc-Regular.otf
Normal file
BIN
data/system/extra_fonts/NotoSerifCJKtc-Regular.otf
Normal file
Binary file not shown.
Binary file not shown.
@ -41,20 +41,20 @@ impl MapLoader {
|
||||
}
|
||||
|
||||
// TODO Generalize this more, maybe with some kind of country code -> font config
|
||||
let zcool = "ZCOOLXiaoWei-Regular.ttf";
|
||||
if name.city.country == "tw" && !ctx.is_font_loaded(zcool) {
|
||||
let chinese_font = "NotoSerifCJKtc-Regular.otf";
|
||||
if name.city.country == "tw" && !ctx.is_font_loaded(chinese_font) {
|
||||
return RawFileLoader::<A>::new(
|
||||
ctx,
|
||||
abstio::path(format!("system/extra_fonts/{}", zcool)),
|
||||
abstio::path(format!("system/extra_fonts/{}", chinese_font)),
|
||||
Box::new(move |ctx, app, bytes| match bytes {
|
||||
Ok(bytes) => {
|
||||
ctx.load_font(zcool, bytes);
|
||||
ctx.load_font(chinese_font, bytes);
|
||||
Transition::Replace(MapLoader::new(ctx, app, name, on_load))
|
||||
}
|
||||
Err(err) => Transition::Replace(PopupMsg::new(
|
||||
ctx,
|
||||
"Error",
|
||||
vec![format!("Couldn't load {}", zcool), err.to_string()],
|
||||
vec![format!("Couldn't load {}", chinese_font), err.to_string()],
|
||||
)),
|
||||
}),
|
||||
);
|
||||
|
@ -39,8 +39,7 @@ Other binary data bundled in:
|
||||
- Overpass font (<https://fonts.google.com/specimen/Overpass>, Open Font
|
||||
License)
|
||||
- Bungee fonts (<https://fonts.google.com/specimen/Bungee>, Open Font License)
|
||||
- ZCOOL XiaoWei fonts (<https://fonts.google.com/specimen/ZCOOL+XiaoWei>, Open
|
||||
Font License)
|
||||
- Noto fonts (<https://www.google.com/get/noto>, SIL Open Font License)
|
||||
- Material Design icons (<https://material.io/resources/icons>, Apache license)
|
||||
- Some Graphics textures (<https://www.kenney.nl/>, CC0 1.0 Universal)
|
||||
- Snowflake SVG (<https://www.svgrepo.com/page/licensing>, CC0)
|
||||
|
Loading…
Reference in New Issue
Block a user