| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Just let the parser carry the error.
|
| |
|
|
|
|
| |
Replace json-glib by a homegrown json parser/printer.
|
|
|
|
|
| |
Add pango_tab_array_set_positions_in_pixels, to help
the serializer out.
|
| |
|
|
|
|
|
| |
Don't calculate line width the hard way when
we can do it much easier.
|
|
|
|
|
|
| |
We don't need to iterate the entire tab array
every time, we just continue from the previous
tab stop position.
|
|
|
|
|
| |
We want to optimize access to tab stops,
and will assume they are ordered.
|
|
|
|
| |
Introduce a LastTab struct, and use it.
|
|
|
|
|
| |
A utility function to ensure tab stops are in
increasing order.
|
|
|
|
| |
Use newlines to separate tabs, rather than spaces.
|
|
|
|
|
|
|
| |
This is useful for PANGO_TAB_DECIMAL.
Implement this in PangoLayout, in the
serializer, and update tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the other tab alignments by adjusting
the tab width as we go.
Based on an old patch by Itai Bar-Haim.
This also includes a fix for the previously
supported left tab alignment in the presence
of indent.
Fixes: #34
|
|
|
|
|
|
|
|
|
| |
Serialize tab alignment in addition to tab
position. We still accept the old format
and default alignment to left.
Update testserialize and layout tests
for this.
|
|
|
|
|
| |
Add right, center, decimal tab alignments and support
them in serialization. They are not implemented yet.
|
|
|
|
|
| |
Explain that tabs really only work with
PANGO_ALIGN_LEFT.
|
|
|
|
|
|
|
|
| |
Even when we show ignorables, we still want to
ignore variation selectors and other ignorables
that we don't have nicks for.
Test included.
|
|
|
|
|
|
|
|
|
|
|
| |
Without this, we end up with line height being
zero in gravity north or west. The visible symptom
is that wrapped lines are drawn on top of each
other with line-height != 0.
Affected tests have been updated.
Fixes: #631
|
|
|
|
|
| |
This was showing up as glyphs placed outside
their logical extents.
|
|
|
|
|
|
|
|
| |
When setting variations to "", font descriptions
would add an ugly useless " @" at the end of their
serialization. Avoid that.
Test included.
|
|
|
|
|
| |
We can only use the width of the previous char
if we are not at the first char. Found by asan.
|
|
|
|
|
| |
The alternative is random test failures, now
that we check all these fields in test-layout.
|
|\
| |
| |
| |
| |
| |
| | |
Hinted metrics fixes
Closes #626
See merge request GNOME/pango!518
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous code was calculating the rounded up version of the
difference between the unhinted ascender and uninted descender. This
however would only result in the correct height if both unhinted
extentss together only differ by less then an a Pango unit from their
hinted counterparts. Otherwise the resulting height would be 1 unit too
short.
Fix this by using the difference between the hinted extents as height.
Fixes: https://gitlab.gnome.org/GNOME/pango/-/issues/626
|
| |
| |
| |
| |
| |
| |
| | |
This replaces the code that was trying to implement those via the ROUND
macro. This avoids a potential issue with values that already were on
whole units being rounded up to the next whole unit in the code that was
implementing CEIL this way.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise editing the output in an editor
is likely to make the data not match anymore,
since most editors will add a final newline.
Update all tests
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Another debug api. This function produces a serialization
of a font that is enough to uniquely identify the font.
This is more detailed than what pango_font_describe
creates.
|
| |
| |
| |
| |
| |
| | |
Json doesn't have comments, so we have to add
an explicit comment value. This will be useful
to describe what test cases are about.
|
| |
| |
| |
| |
| |
| |
| | |
If requested, serialize lines, runs, and log attrs.
This will let us use the serialization format to
record not just the test inputs, but outputs as
well.
|
| |
| |
| |
| |
| |
| | |
Add some private api for the serializer to get
the font matrix. This is needed to let the serializer
write a unique fingerprint for the font.
|
| | |
|
| |
| |
| |
| | |
Avoid writing out empty attributes or tabs.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Optionally include context information in the
serialization and restore it. This will be useful
for transporting for giving tests complete data
that affects their output.
Some tests included.
|
| |
| |
| |
| |
| |
| |
| | |
This gives us some room to add more things
to these apis, e.g. a way to store not just
the input part of a layout, but also the
output.
|
| | |
|
| |
| |
| |
| |
| | |
They are produced by deserialization,
so call them that.
|
| | |
|
| |
| |
| |
| |
| | |
Make space actually show up as visible space
when we want that.
|
| |
| |
| |
| |
| |
| |
| | |
When handling items that fix completely,
we were not consistently taking extra width
into account, leading to hyphens sticking
out in some cases.
|
| |
| |
| |
| |
| |
| |
| | |
When looking at scripts, we want to look
at the script of the *previous* character.
And then we need to exclude SHY from the
common script.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When we take a complete item because there are
no breakpoints, we were inserting a hyphen at
the end even though there may not be a breakpoint
there, and ending up with a hyphen in the middle
of an (overlong) line: Brat-wurst.
Test included.
This but was discovered with the help of
http://gitlab.gnome.org/matthiasc/layout-editor
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
I went a bit overboard in #603. The vertical bar
is too common, and this usage to specialized to
do it by default. To enable this, we should rather
make log attrs tweakable.
We still replace hyphenation points with hyphens.
Fixes: #630
|
|
|
|
|
|
| |
The value does not really matter for these,
but it looks more natural if they have a
value of 1, and not 0.
|
|
|
|
|
|
|
|
| |
Add api to serialize PangoLayout, for the benefit
of testing and debugging. Currently, this uses
json, but that is an implementation detail.
Some tests included.
|
|
|
|
|
|
| |
This code gets run for gtks size-allocation,
and we don't want it to be any slower than it
has to be, when not debugging it.
|
| |
|
|
|
|
|
|
| |
Add an api to serialize PangoAttrList.
This will be useful in testing and debugging.
|