-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDF text rendering plugin #314
base: main
Are you sure you want to change the base?
Changes from all commits
a3894e3
30aa187
4edde09
e74125b
3f6ad5b
7c72070
48dfc87
de13788
b213f6d
b8458e8
078cad9
157e88f
2f7318d
9ac7393
689298b
297a49d
8c7d706
c7eeb9c
3ae1538
fdbe884
acdafc4
12c5b26
a732006
cd0e930
b2823e2
2d3a1ec
68ae915
ef5c247
776d89e
2dfc990
6312e56
60b0978
9a15dc7
da49d44
f1c2406
d9c811f
5a76566
58d1ebd
84f31e8
27644e7
ecd23aa
722b4a0
b317e74
8f3f34e
89713a1
cc55d6e
daaaa76
41ac369
de45903
4f09105
111730c
6bedd50
70a5c3d
6786186
eb83dae
4328389
4a8b820
6212101
129ec48
99bd57b
48bad01
dddaa35
3f66796
f9d8f50
97f6824
fa1dd8a
546970e
a1af58d
3a4dfe4
f9281ac
b1006ab
d96ba5f
8c97683
b911b05
160994d
24a33bf
3fbe3c1
e684984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Protocol Version 1 | ||
// Adapted from https://github.com/maplibre/maplibre-native/blob/2e3538c2fe9bcf2e3961971a0807c2d2c17a3f06/misc/proto/glyphs.proto#L4 | ||
|
||
package glyphs; | ||
|
||
option optimize_for = LITE_RUNTIME; | ||
|
||
// Stores a glyph with metrics and optional SDF bitmap information. | ||
message glyph { | ||
required uint32 id = 1; | ||
|
||
// A signed distance field of the glyph with a border of 3 pixels. | ||
optional bytes bitmap = 2; | ||
|
||
// Glyph metrics. | ||
required uint32 width = 3; | ||
required uint32 height = 4; | ||
required sint32 left = 5; | ||
required sint32 top = 6; | ||
required uint32 advance = 7; | ||
} | ||
|
||
// Stores fontstack information and a list of faces. | ||
message fontstack { | ||
required string name = 1; | ||
required string range = 2; | ||
repeated glyph glyphs = 3; | ||
} | ||
|
||
message glyphs { | ||
repeated fontstack stacks = 1; | ||
|
||
extensions 16 to 8191; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Mars, no water exists!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True! We must create water on mars first