| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Look for whether the char before the break
is not whitespace and doesn't look like a
hyphen.
|
|
|
|
|
|
|
| |
Now that we are inserting glyphs out of thin air,
we can end up with clusters that have
start_char == end_char. Allowing that does not
obviously cause any issues.
|
|
|
|
|
|
|
|
|
| |
Instead, reshape the pre-break run with the
soft hyphen replaced by an actual hyphen.
This is unfortunately inefficient, we copy
the entire text for this. The alternative
(scatter-gather populating the harfbuzz
buffer) is too hard to manage.
|
|\
| |
| |
| |
| | |
Tailor break
See merge request GNOME/pango!86
|
| |
| |
| |
| |
| | |
To break correctly, use pango_default_break and
pango_tailor_break.
|
| |
| |
| |
| |
| |
| | |
Call pango_default_break on the entire text,
and then pango_tailor_break on segments with
homogeneous language and script.
|
| |
| |
| |
| |
| |
| | |
This function lets you apply language-specific
tailoring on top of breaks produced by
pango_default_break.
|
| | |
|
| |
| |
| |
| |
| |
| | |
PangoContext has somewhat redundant code to create
metrics, which wasn't treating the new height member
like it should.
|
|/
|
|
|
| |
We use them in a loop. Don't free them before
the loop is done.
|
|
|
|
| |
Make sure we declare variables at the top of the block.
|
|
|
|
|
| |
insert_run (... TRUE) frees the need_hyphen array,
so we need to check for the hyphen beforehand.
|
|
|
|
|
|
|
|
|
|
|
| |
Point the item that we create for the inserted hyphen
at the SHY in the paragraph text, shortening the previous
run by one character.
It would be nicer to not insert an extra run at all
and just reshape the previous one in a way that maps
the SHY to a hyphen, but that is more difficult to do
as long as we are going through the shape engine API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had some sad cases where we used a char offset
as a byte index, with the expected bad results once
there are multibyte characters in the mix.
Instead of poking at the text in the middle of
line-breaking, go back to keeping a plain array
of positions that need a hyphen inserted. We
maintain this array in parallel to the existing
log_widths array, so hopefully the offset math
is working out now.
It is tempting to look at log_attrs.is_white for this,
but that gives us double hyphens when breaks are taken
at explicit hyphens. So, keep this information separately.
|
|
|
|
|
| |
We had a boolean member in ParaBreakState that
was used as an int. Oops
|
| |
|
|
|
|
| |
Avoid duplicate comments in struct defintions.
|
| |
|
| |
|
|
|
|
| |
We have pango_font_has_char now.
|
|
|
|
|
| |
We already had a has_char api in pangofc,
so use that name.
|
|
|
|
| |
This reverts commit f972ba0562823a8d55ad02ff9609481a884c79f8.
|
|
|
|
| |
This reverts commit 8b85815f1b122842d915e7fc29cc68d228a64dbb.
|
|
|
|
| |
This should do a deep copy.
|
|
|
|
| |
We never created the set. Oops.
|
| |
|
|
|
|
| |
gtk-doc doesn't like these.
|
|
|
|
| |
Don't use deprecated api to implement deprecated api!
|
|
|
|
|
| |
Clarify that the default features of the
rendering system are not included.
|
|
|
|
|
| |
Include freetype.h in headers where freetype
types are used.
|
|
|
|
|
| |
We don't use _pango_cairo_fc_font_map_get_library
anymore.
|
|
|
|
|
|
| |
This function has long been deprecated;
and it is is using freetype. So drop the
implementation.
|
| |
|
|
|
|
|
| |
We take features out of the FcPattern and
translate them into harfbuzz features.
|
| |
|
|
|
|
|
|
| |
Make PangoCoverage a GObject, and subclass
it in pangofcfontmap.c. This lets us use
the FcCharSet without copying the data.
|
|
|
|
|
|
| |
This drops the language dependency and
coverage levels, both of which are not
used in pango.
|
|
|
|
| |
This replaces all uses of _pango_engine_shape_covers.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a pango_font_covers function, which is like
pango_shape_engine_covers, without the engine.
This api is simpler than PangoCoverage in that
it does not take a language as input, and only
returns a boolean.
This matches the harfbuzz api.
|
|
|
|
|
|
| |
Before passing the features to hb_shape(), set their ranges,
since they are no longer always for the full length of the
item.
|
|
|
|
|
|
|
|
|
|
| |
Don't pass font_features attributes into the itemize
run, since we don't need to break runs for this.
Split them off, and reapply them after itemization.
We rapply them before line breaking, since we want
them to affect the shaping.
Closes: https://gitlab.gnome.org/GNOME/pango/issues/242
|
|
|
|
|
| |
This adds attrs that are overlapping the range
of the item to the extra_attrs in the analysis.
|
|
|
|
|
|
| |
We already count foreground and background color
as no-shape attributes, so it makes sense to
treat alpha the same.
|
|
|
|
|
|
| |
Based on a patch by Matijs van Zuijlen <matijs@matijs.net>.
Closes https://gitlab.gnome.org/GNOME/pango/issues/259
|
|
|
|
|
|
|
| |
Don't run off the end of an array that we
allocated to certain length.
Closes: https://gitlab.gnome.org/GNOME/pango/issues/342
|
|\
| |
| |
| |
| | |
itemize: Don't change font for line separator
See merge request GNOME/pango!71
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If we render this (in single-paragraph mode), we
draw a hex box, so changing font just for the line
separator is never useful, and in fact, counterproductive
in cases where the font has a (typically empty) glyph
for it.
This fixes the [LS] or [PS] hex boxes not showing up
in single-paragraph mode depending on font fallback.
|
| |
| |
| |
| |
| | |
Move the fontconfig+harfbuzz using parts to libpango,
since we want to start using harfbuzz on all platforms.
|
| |
| |
| |
| |
| | |
Only link libpangoxft and libpangocairo
against xft and cairo.
|
| | |
|