summaryrefslogtreecommitdiff
path: root/pango/pango-context.c
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Don't treat U+1680 OGHAM SPACE MARK as whitespaceBehdad Esfahbod2016-03-111-1/+1
| | | | | Unicode says: "U+1680 ogham space mark is unusual in that it is generally rendered with a visible horizontal line, rather than being blank."
* Avoid some overhead in itemize_state_process_runMatthias Clasen2015-09-131-10/+9
| | | | | Avoid determining the Unicode type repeatedly. Instead, just get the type once and filter out the classes we want.
* [modules] Move language modules in source tree and remove modules/Behdad Esfahbod2015-04-041-18/+1
| | | | | | | This should complete the kill-modules effort. What is left is leftover removal and unbreaking stuff. Bug 733882 - Kill Pango modules, engines, and config files
* Hide internal symbolBehdad Esfahbod2015-04-041-1/+1
|
* Deprecate module system, skip it for shaper modulesBehdad Esfahbod2015-04-041-127/+49
| | | | | | | | | | | | | | Now shaper is discovered via (previously unused!) font->find_shaper(). I'm keeping that just to allow clients override shaping. Though, even that I'm not sure we want to keep. Wraps shaper in PangoEngineShape structs to keep PangoAnalysis API intact. Deprecated pango-modules.h and some pango-engine.h. Language modules are not moved yet. Wired up PangoFc, PangoWin32, and PangoCoretext shapers.
* Add many missing nullability annotations.Evan Nemerson2014-10-161-8/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=731022
* Add more Hangul jamo to previous commitBehdad Esfahbod2014-07-311-1/+3
| | | | https://github.com/GNOME/pango/commit/61aeba6257ec7691a7a5222fb69aec3cc042435b#commitcomment-7215250
* Don't break run in the middle of Hangul jamo sequenceBehdad Esfahbod2014-07-301-2/+21
| | | | | | | See comments. Bug 705727 - Incorrect rendering w/ Hangul syllable composition GSUB https://bugzilla.gnome.org/show_bug.cgi?id=705727
* Bug 685167 - migrate docs to no-tmpl flavourBehdad Esfahbod2013-09-271-1/+17
| | | | Patch from Rafał Mużyło.
* Bug 703995 - Compiler warnings about strict aliasingBehdad Esfahbod2013-08-301-2/+2
| | | | Patch from Akira TAGOH.
* Don't change fonts just for space charactersBehdad Esfahbod2013-06-061-6/+6
| | | | | | | | | | | | | | | | Back in the days we used to always use the font from surrounding runs for any space characters. I changed that when I found that rendering MathML results in hexboxes when a font doesn't have the space characters needed... Forward to these days: HarfBuzz will silently compatibility-decompose any space character to the ASCII space. And looks like it's important for Mongolian to not break runs around NNBSP. As such, go back to never choosing a font just for space characters. Seems to work, though more testing is needed. Bug 701652 - wrong shaped classic Mongolian word suffixes
* Fix most of "failed to choose font" warningsBehdad Esfahbod2012-12-301-1/+10
| | | | | | | If we are in fallback mode, with a font that has to space glyph, then looking up engine/font for any character not in the font was failing badly. In that case, if there's only one engine (which is the case these days), just choose it.
* Track changes in layout and dependencies via serialsAlexander Larsson2012-12-061-1/+0
| | | | | | | | | We track changes in the PangoContext and automatically call pango_layout_context_changed() when needed, plus we track changes in the layout and let apps know via pango_layout_get_serial when the layout changed and needs to be redrawn. https://bugzilla.gnome.org/show_bug.cgi?id=340066
* Track changes in PangoContext via a serialAlexander Larsson2012-12-061-3/+103
| | | | | | | | | | | | Whenever a PangoContext or its fontmap changes we bump the contexts serial, you can get it via pango_context_get_serial() to see find out if the context changed since the last time and you need to relayout. You can also force the context to be "changed" by calling pango_context_changed(). https://bugzilla.gnome.org/show_bug.cgi?id=340066