mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
Add tests for glyph positioning
These tests check that we round glyph positions to integral device pixel coordinates when hinting is enabled, and to device subpixel positions if it isn't.
This commit is contained in:
parent
4f2d63b8ac
commit
880e3ef289
@ -0,0 +1,20 @@
|
||||
color {
|
||||
color: #808080;
|
||||
bounds: 0 -30 40 40;
|
||||
}
|
||||
text {
|
||||
font: "boxes 32px" url("data:font/ttf;base64,\
|
||||
AAEAAAAIAIAAAwAAY21hcABUAL8AAAEcAAAAPGdseWavMnMAAAABZAAAAKhoZWFkJwCrnwAAAIwA\
|
||||
AAA2aGhlYQwiACUAAADEAAAAJGhtdHgQIAAAAAABCAAAABJsb2NhAFgAjAAAAVgAAAAMbWF4cAAI\
|
||||
AAkAAADoAAAAIG5hbWV4eNV2AAACDAAAABcAAQAAAAEZmo4ZWh5fDzz1AAIIAAAAAADhwj0AAAAA\
|
||||
AOIJCg8AAAAABCAGAAAAAAEAAgAAAAAAAAABAAAIAPwAAAAEIAAAAAAEIAABAAAAAAAAAAAAAAAA\
|
||||
AAAABAABAAAABQAIAAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEIAAABAAAAAAAAAAA\
|
||||
AAABAAAAAwAAAAwABAAwAAAACAAIAAIAAAAgAEMAVP//AAAAIABBAFT////g/8D/sAABAAAAAAAA\
|
||||
AAAAAAAMABgALABAAFQAAQAAAAAEAAQEAAMAADEhESEEAPwABAQAAQAAAAAEAAYAAAMAADEhESEE\
|
||||
APwABgAAAgAAAAAEIAQgAAMABwAAMSERIRMRIREEIPvggAMABCD8YAMA/QAAAAIAAAAABAAEAAAD\
|
||||
AAcAADEhESETESERBAD8AIADAAQA/IADAP0AAAACAAAAAAQABAAAAwAHAAAxIREhExEhEQQA/ACA\
|
||||
AwAEAPyAAwD9AAAAAAABABIAAQAAAAAAAQAFAABib3hlcwA=\
|
||||
");
|
||||
glyphs: 4 16 0 0.4, 4 16 0 0.6;
|
||||
hint-style: slight;
|
||||
}
|
BIN
testsuite/gsk/compare/glyph-hinting-position-nogl-nocairo.png
Normal file
BIN
testsuite/gsk/compare/glyph-hinting-position-nogl-nocairo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 179 B |
20
testsuite/gsk/compare/glyph-subpixel-position.node
Normal file
20
testsuite/gsk/compare/glyph-subpixel-position.node
Normal file
@ -0,0 +1,20 @@
|
||||
color {
|
||||
color: #808080;
|
||||
bounds: 0 -30 40 40;
|
||||
}
|
||||
text {
|
||||
font: "boxes 32px" url("data:font/ttf;base64,\
|
||||
AAEAAAAIAIAAAwAAY21hcABUAL8AAAEcAAAAPGdseWavMnMAAAABZAAAAKhoZWFkJwCrnwAAAIwA\
|
||||
AAA2aGhlYQwiACUAAADEAAAAJGhtdHgQIAAAAAABCAAAABJsb2NhAFgAjAAAAVgAAAAMbWF4cAAI\
|
||||
AAkAAADoAAAAIG5hbWV4eNV2AAACDAAAABcAAQAAAAEZmo4ZWh5fDzz1AAIIAAAAAADhwj0AAAAA\
|
||||
AOIJCg8AAAAABCAGAAAAAAEAAgAAAAAAAAABAAAIAPwAAAAEIAAAAAAEIAABAAAAAAAAAAAAAAAA\
|
||||
AAAABAABAAAABQAIAAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAEIAAABAAAAAAAAAAA\
|
||||
AAABAAAAAwAAAAwABAAwAAAACAAIAAIAAAAgAEMAVP//AAAAIABBAFT////g/8D/sAABAAAAAAAA\
|
||||
AAAAAAAMABgALABAAFQAAQAAAAAEAAQEAAMAADEhESEEAPwABAQAAQAAAAAEAAYAAAMAADEhESEE\
|
||||
APwABgAAAgAAAAAEIAQgAAMABwAAMSERIRMRIREEIPvggAMABCD8YAMA/QAAAAIAAAAABAAEAAAD\
|
||||
AAcAADEhESETESERBAD8AIADAAQA/IADAP0AAAACAAAAAAQABAAAAwAHAAAxIREhExEhEQQA/ACA\
|
||||
AwAEAPyAAwD9AAAAAAABABIAAQAAAAAAAQAFAABib3hlcwA=\
|
||||
");
|
||||
glyphs: 4 16 0 0.4, 4 16 0 0.6;
|
||||
hint-style: none;
|
||||
}
|
BIN
testsuite/gsk/compare/glyph-subpixel-position.png
Normal file
BIN
testsuite/gsk/compare/glyph-subpixel-position.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 176 B |
@ -84,6 +84,8 @@ compare_render_tests = [
|
||||
'glyph-cache-overflow-slices',
|
||||
'glyph-hinting-none',
|
||||
'glyph-hinting-slight',
|
||||
'glyph-hinting-position-nogl-nocairo',
|
||||
'glyph-subpixel-position',
|
||||
'glyph-scaling',
|
||||
'glyph-antialias',
|
||||
'huge-height',
|
||||
|
Loading…
Reference in New Issue
Block a user