mirror of
https://github.com/maplibre/martin.git
synced 2024-12-21 05:41:55 +03:00
9b112ae7b9
This implements dynamic font protobuf generation, allowing users to request font ranges on the fly, and combining them in any order, e.g. `Font1,Font2,Font3`, same as with sprites and tiles This is a first iteration, without any multithreading support. In theory, this could be done far faster by generating SDFs with multiple threads. ### Current process * during init, figure out all glyphs available in each font, and store them as a bitset * during request: * combine requested bitsets to figure out which glyph should come from which font file * load those glyphs from files (using a single instance of the freetype lib) * convert them to SDFs and package them into a protobuf --------- Co-authored-by: Lucas <zhangyijunmetro@hotmail.com>
74 lines
1.7 KiB
JSON
74 lines
1.7 KiB
JSON
{
|
|
"tiles": {
|
|
"MixPoints": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "MixedCase.MixPoints.Geom"
|
|
},
|
|
"auto_table": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "autodetect.auto_table.geom"
|
|
},
|
|
"bigint_table": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "autodetect.bigint_table.geom"
|
|
},
|
|
"function_zxy_query": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.function_zxy_query"
|
|
},
|
|
"function_zxy_query_test": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.function_zxy_query_test"
|
|
},
|
|
"pmt": {
|
|
"content_type": "image/png"
|
|
},
|
|
"points1": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.points1.geom"
|
|
},
|
|
"points2": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.points2.geom"
|
|
},
|
|
"points3857": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.points3857.geom"
|
|
},
|
|
"table_source": {
|
|
"content_type": "application/x-protobuf",
|
|
"description": "public.table_source.geom"
|
|
}
|
|
},
|
|
"sprites": {
|
|
"mysrc": {
|
|
"images": [
|
|
"bicycle"
|
|
]
|
|
},
|
|
"src1": {
|
|
"images": [
|
|
"another_bicycle",
|
|
"bear",
|
|
"sub/circle"
|
|
]
|
|
}
|
|
},
|
|
"fonts": {
|
|
"Overpass Mono Light": {
|
|
"family": "Overpass Mono",
|
|
"style": "Light",
|
|
"glyphs": 931,
|
|
"start": 0,
|
|
"end": 64258
|
|
},
|
|
"Overpass Mono Regular": {
|
|
"family": "Overpass Mono",
|
|
"style": "Regular",
|
|
"glyphs": 931,
|
|
"start": 0,
|
|
"end": 64258
|
|
}
|
|
}
|
|
}
|