summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop pango-fontset-private.hMatthias Clasen2021-12-241-1/+1
| | | | This was just an empty header.
* Reshuffle private headers a bitMatthias Clasen2021-11-071-0/+1
| | | | pango_itemize_with_font belongs into pango-item-private.h.
* CosmeticMatthias Clasen2021-08-281-1/+4
| | | | | | Improve the itemization code to have all variants take the same code paths, so we can do fixups in one place.
* Some code reorgMatthias Clasen2021-08-201-1151/+2
| | | | | Split the itemization code into its own file, and move things around a bit.
* itemize: Ignore width in horizontal contextignore-width-in-horizontal2Matthias Clasen2021-08-031-0/+3
| | | | | | | | | Changes in width only need to break runs in vertical context. Update tests and add a new test. Fixes: #503
* itemize: Fix up gravity state initializationgravity-fixMatthias Clasen2021-08-021-4/+5
| | | | | | | | itemize_state_init was setting gravity-related fields to their initial values too late, after update_attr_iterator has already set them to the values for the first run. Test included.
* itemize: Improve handling of spacesspace-itemizationMatthias Clasen2021-07-101-15/+71
| | | | | | | | | Put spaces into the previous or the next item, depending on which one has the 'better' font. This reduces space variations in the presence of font fallback. See: #249
* docs: Link syntax fixesdocs-link-fixesMatthias Clasen2021-05-251-3/+3
| | | | | Now that gi-docgen warns about link syntax errors, we can find and fix them.
* docs: Add a missing backtickMatthias Clasen2021-05-211-1/+1
|
* docs: Reduce redundancydocs-cleanupsMatthias Clasen2021-05-201-2/+2
| | | | | | Remove a boatload of "or %NULL" from nullable parameters and return values. gi-docgen generates suitable text from the annotation that we don't need to duplicate.
* introspection: Stop using allow-noneMatthias Clasen2021-05-191-5/+5
| | | | | The allow-none annotation has been deprecated for a long time already. Instead use optional and nullable everywhere.
* CosmeticsMatthias Clasen2021-05-081-4/+4
|
* Small speedup to width itermisc-speedupsMatthias Clasen2021-03-291-6/+9
|
* context: Cache metrics for the current fontcache-context-metricsMatthias Clasen2021-03-181-0/+16
| | | | | | GTK calls pango_context_get_metrics() frequently to determine character widths and alignments, and does not expect this to involve expensive layout operations.
* Fix various broken linksMatthias Clasen2021-03-111-3/+3
| | | | All these were pointed out by gi-docgen warnings.
* docs: Tweak context docsMatthias Clasen2021-03-111-28/+32
| | | | Add summaries to doc comments, etc.
* docs: Port PangoContext to the new doc formatMatthias Clasen2021-03-111-314/+323
| | | | Replace gtk-doc'isms and use gi-docgen links instead.
* docs: Convert rendering section to pango_rendering.mdMatthias Clasen2021-03-111-12/+0
|
* docs: Make context section ids matchMatthias Clasen2021-03-111-1/+1
| | | | | Doing this makes g-ir-scanner pick up the long description, which is more useful than the struct docs.
* docs: Remove references to gdk_pango_context_get_for_screendocs-tweakMatthias Clasen2021-02-111-2/+1
| | | | Remove references to a function that no longer exists in gtk.
* Fix the length checkingWeng Xuetian2021-01-141-1/+1
| | | | Closes #526
* Fix handling of keycap sequencesMatthias Clasen2020-09-171-5/+11
| | | | | | | | | | | | The last character of Emoji keycap sequences, 0x20E3, has a vertical orientation of U, according to Unicode. This unfortunately makes the width iter frequently break such sequences into multiple items, preventing them from being rendered as expected. Fix this by ignoring width changes inside Emoji sequences. Fixes: #502
* itemize: Work around gtk2 brokennessMatthias Clasen2020-06-101-1/+1
| | | | | | | | | | | GTK 2 apparently manages to call pango_itemize_with_base_dir with a non-zero length for a string that contains 0 characters. That in turn causes pango_log2vis_get_embedding_levels to return NULL, and things go downhill from there. A test is included. Fixes: #480
* pango-context: avoid assignment to uninitialized valueTimm Bäder2020-06-101-1/+2
| | | | | | | | | We're assigning EMBEDDING_CHANGED to state->changed in update_embedding_end(). At that point state->changed is uninitialized, but that doesn't matter since we later override the value anyway. Just pull the initialization to earlier in that function, which assigns EMBEDDING_CHANGED anyway, so doesn't change anything.
* Don't depend on glib 2.60 symbols at runtimeAlexander Larsson2019-08-251-5/+7
| | | | | | | The G_TYPE_UNICODE_STRING type was added in 2.60, which broke applications using older glib versions (such as matlab). The only usecase was a warning message anyway, so we just avoid using it.
* context: Add an option for rounding glyph positionsMatthias Clasen2019-08-031-0/+46
| | | | | | | | | | | This is a global option, similar in spirit to font options, so it makes sense to keep it in PangoContext. Default to rounding glyph positions, which preserves the pre-1.44 behavior and should help cure all the 'broken' font rendering with older cairo versions.
* Remove unused remnants of shape engineKhaled Hosny2019-07-191-1/+0
|
* itemize: Stop filling analysis->shape_engineMatthias Clasen2019-07-181-88/+36
| | | | This field is unused now.
* Fix compiler warningsMatthias Clasen2019-07-181-1/+1
|
* context: Treat metrics height like ascent+descentMatthias Clasen2019-07-161-0/+1
| | | | | | PangoContext has somewhat redundant code to create metrics, which wasn't treating the new height member like it should.
* Some more doc tweaksMatthias Clasen2019-07-141-0/+11
|
* Add some more docsMatthias Clasen2019-07-131-0/+2
|
* Rename pango_font_coversMatthias Clasen2019-07-121-3/+1
| | | | | We already had a has_char api in pangofc, so use that name.
* Use pango_font_coversMatthias Clasen2019-07-111-3/+1
| | | | This replaces all uses of _pango_engine_shape_covers.
* Merge branch 'line-separator-font' into 'master'Matthias Clasen2019-07-101-0/+4
|\ | | | | | | | | itemize: Don't change font for line separator See merge request GNOME/pango!71
| * itemize: Don't change font for line separatorMatthias Clasen2019-07-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove language engine remnantsMatthias Clasen2019-07-091-9/+0
|/ | | | | Drop all internal use of language engines. The lang_engine field in PangoAnalysis is now unused.
* Header cleanupMatthias Clasen2019-07-041-0/+3
| | | | | | | Abolish the PANGO_ENABLE_BACKEND and PANGO_ENABLE_ENGINE defines. All backend-only apis are moved into private headers, all apis that were engine-only are marked as deprecated, since engines are.
* Stop using the PangoScript typeMatthias Clasen2019-05-271-2/+2
| | | | | | We were using the enum nicks in on place. Use GUnicodeScript instead, since that is getting updated for newer Unicode versions.
* Revert "Replace PangoScript by GUnicodeScript"Michael Catanzaro2019-05-271-6/+4
| | | This reverts commit 3e754defc364a89b2136894399b3463976840156
* Replace PangoScript by GUnicodeScriptMatthias Clasen2019-05-251-4/+6
| | | | | | | | | This commit replaces the PangoScript enum by a typedef to GUnicodeScript, and preserves the old enum values as defines. This depends on adding an enum type for GUnicodeScript in gobject.
* Merge branch 'issue-322' into 'master'Khaled Hosny2018-12-131-21/+54
|\ | | | | | | | | | | | | Issue #322 - Vertical text doesn't fall back to rotated versions of horizontal glyphs when necessary Closes #322 See merge request GNOME/pango!28
| * Issue #322 - Vertical text doesn't fall back to rotated versions ...ONO Yoshio2018-10-221-21/+54
| | | | | | | | | | | | | | ...of horizontal glyphs when necessary Implemented UAX#50 to determine whether characters rotate or not in vertical layout.
* | Clarify docs around text inputMatthias Clasen2018-12-121-1/+1
|/ | | | | | | Make it clear that all text input must be valid UTF-8, except in the case pango_layout_set_text, which we now officially document as accepting and handling invalid input.
* Bug 784243 - Pango gravity is not applied on markup with multiple spans.Behdad Esfahbod2017-08-111-3/+1
| | | | Patch from Harioum Pratap Singh.
* Choose emoji font for color emojiBehdad Esfahbod2017-07-311-4/+41
| | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785566
* pango: Support emoji sequence in UnicodePeng Wu2017-07-291-0/+27
| | | | | | | | | | | Checked several emoji sequences, the sequence pattern is like follows: 1. Use zero width joiner to combine two characters with any width 2. Ignore the width of variation selector, tag and emoji modifier for the purposes of finding a run or uniform-width characters. https://bugzilla.gnome.org/show_bug.cgi?id=780669
* Don't change fonts for variation selectorsBehdad Esfahbod2017-05-221-1/+6
| | | | | Fixes https://bugzilla.gnome.org/show_bug.cgi?id=781123 Patch from Takao Fujiwara.
* Add assertions to guard against division by zero on sample text pathsPhilip Withnall2017-02-141-1/+7
| | | | | | | | | | | | | There are a few code paths where pango_utf8_strwidth() is called on language-specific sample text. The sample text should have been chosen to never have a zero width, but we should add some assertions to ensure that’s the case. This guides static analysers into the right analysis. Coverity IDs: 1391697, 1391698, 1391699 Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=778602
* Avoid deprecation warningsMatthias Clasen2016-08-291-0/+2
| | | | | Now that we're using new-style deprecations, we have to fight a little harder to get rid of them inside pango.