summaryrefslogtreecommitdiff
path: root/pango
Commit message (Collapse)AuthorAgeFilesLines
* layout-run: Use line spacingMatthias Clasen2022-01-251-1/+1
| | | | | | | | Take line spacing into account when determining the leading to use for logical extents. We add line spacing when we use gap metrics from the font, and ignore it when line height is determined by line height attributes.
* item: Add line spacing to ItemPropertiesMatthias Clasen2022-01-252-0/+6
|
* Add a line spacing attributeMatthias Clasen2022-01-252-0/+34
| | | | | This will be used to restore the PangoLayout spacing property.
* Tweak PangoAlignmentMatthias Clasen2022-01-252-18/+34
| | | | | | | | | | | | Remove the justify-all value, and drop the justify-last-line feature from PangoLayout. This can be done better using PangoLineBreaker now. On the flip side, add a 'natural' value, since that is what we want to fall back to for the last line in a justified paragraph. And CoreText has this value too. Make PANGO_ALIGN_NATURAL the default.
* Make PangoLayoutRun a separate typeMatthias Clasen2022-01-253-5/+9
| | | | | | It is nicer to have an opaque type for the iter, and only use PangoGlyphItem in the implementation.
* The big rename of doomMatthias Clasen2022-01-2536-11133/+1916
| | | | | | | | | | simple layout -> layout line iter -> layout iter line -> layout line This commit replaces the old PangoLayout implementation with PangoSimpleLayout, and does all the necessary cleanups.
* debug: check invariants in pango-layout tooMatthias Clasen2022-01-241-0/+53
| | | | | this is for comparison purposes, and to see what to aim for.
* serializer: fix buildMatthias Clasen2022-01-241-43/+3
|
* Implement serialization for PangoSimpleLayoutMatthias Clasen2022-01-242-12/+483
|
* Implement rendering for PangoLineMatthias Clasen2022-01-245-84/+375
|
* Add PangoLineIterMatthias Clasen2022-01-249-0/+1011
|
* Add PangoSimpleLayoutMatthias Clasen2022-01-244-0/+1700
| | | | | This is a simplified reimplementation of PangoLayout around PangoLineBreaker and PangoLines.
* Add PangoLinesMatthias Clasen2022-01-245-0/+1337
| | | | | This is an array of positioned PangoLine objects.
* Add PangoLineBreakerMatthias Clasen2022-01-244-0/+2698
| | | | This is the guts of PangoLayout, spilled out.
* Implement ellipsization for PangoLineMatthias Clasen2022-01-241-88/+145
|
* Add PangoLineMatthias Clasen2022-01-245-0/+1715
| | | | | This is an opaque, immutable object holding a line of shaped text.
* Add PangoLayoutRunMatthias Clasen2022-01-245-0/+212
| | | | | Make this a separate type from PangoGlyphItem, and give it some minimal api.
* Add PangoLeadingTrimMatthias Clasen2022-01-241-0/+24
|
* Add PangoAlignmentMatthias Clasen2022-01-241-0/+9
| | | | | | | Tnis is an enum that combines alignment and justification. This makes sense, is commonly done in other systems, and lets us pass a single argument instead of 3 (align, justify and justify-last).
* Add single-paragraph mode to ItemPropertiesMatthias Clasen2022-01-242-12/+18
| | | | | The line breaking code will pick it up there later.
* Move ItemPropertiesMatthias Clasen2022-01-243-129/+131
| | | | | This will be used in multiple places going forward, so move it to pango-item.c
* Add a paragraph attributeMatthias Clasen2022-01-243-0/+43
| | | | This will be used to implement single-paragraph mode.
* pango-layout: export a helperMatthias Clasen2022-01-241-1/+7
| | | | | Make pango_layout_run_get_extents_and_height available for use outside of pango-layout.c.
* itemize: Break paragraph separatorsMatthias Clasen2022-01-241-5/+12
| | | | | | We don't normally meet paragraph separators in the text that gets itemized. But if we do, we want them in their own items.
* shape: CosmeticsMatthias Clasen2022-01-241-5/+4
| | | | Tweak a comment
* break: CosmeticsMatthias Clasen2022-01-241-12/+7
| | | | Just rearrange the hyphen code slightly.
* layout: Move enum types to pango-types.hMatthias Clasen2022-01-242-64/+65
| | | | This will make it easier to rearrange things later.
* attributes: Better error messageMatthias Clasen2022-01-241-1/+6
| | | | Mention relevant details
* docs: Fix a typoMatthias Clasen2022-01-211-1/+1
|
* Fix allow_breaks handlingfix-allow-breaksMatthias Clasen2022-01-201-3/+3
| | | | | | | | | handling of segmentation attributes can introduce line breaks, after we removed them in allow_breaks handling. Change the order to handle allow_breaks last, so this doesn't happen. Update affected tests.
* Fix a g_ascii_formatd callfix-asciid-callMatthias Clasen2022-01-181-1/+1
| | | | | | | | | | | We were passing a format specifier that starts with ' ', which some implementations of that API don't like. This change removes an extraneous space from the output. Update affected tests. Fixes: #659
* Check for fontmapsno-fontmap-no-funMatthias Clasen2022-01-141-0/+2
| | | | | | | To avoid trivialities, check that our context has a fontmap, at a strategic place. Fixes: #658
* docs: Fix a typoMatthias Clasen2022-01-141-3/+3
|
* Deprecate pango_coverage_ref/unrefdeprecate-coverage-refMatthias Clasen2022-01-102-3/+7
| | | | These are just wrappers of g_object_ref/unref.
* Drop uses of pango_coverage_ref/unrefMatthias Clasen2022-01-107-13/+13
| | | | Just use g_object_ref/unref.
* Add version macros for 1.52Matthias Clasen2022-01-101-0/+24
|
* fonts: Fix get_face default implMatthias Clasen2022-01-101-1/+1
|
* Add a default implementation for list_facesMatthias Clasen2022-01-101-0/+13
|
* Merge branch 'attrlist-splice' into 'main'Matthias Clasen2022-01-101-3/+17
|\ | | | | | | | | | | | | Clarify pango_attr_list_splice docs Closes #653 See merge request GNOME/pango!574
| * Reinstate previous behavior or pango_attr_list_spliceattrlist-spliceMatthias Clasen2022-01-071-3/+17
| | | | | | | | | | | | | | | | | | | | If gap is zero, don't limit the inserted attributes; that does not make sense. Spell out the different use cases in the docs. Testcase included. Fixes: #653
| * Clarify pango_attr_list_splice docsMatthias Clasen2022-01-071-1/+1
| | | | | | | | | | Make it explicit that the spliced-in attributes are limited to the the 'gap'.
* | g-i: add since annotations to enum membersbilelmoussaoui/giBilal Elmoussaoui2022-01-082-14/+8
|/
* Avoid an uninitialized variable warningMatthias Clasen2022-01-061-1/+4
| | | | Fixes: #650
* serializer: Serialize non-ASCII correctly if char is unsignedSimon McVittie2022-01-041-1/+1
| | | | | | | | | | | | | If char is unsigned, the first byte of a non-trivial UTF-8 sequence will be 0x80 or higher, instead of being negative. In this case we need to process it as UTF-8, instead of printing only the first byte and then skipping to the next UTF-8 character. char is usually signed on x86 and some other architectures, but not on the ARM or PowerPC families, among others. Resolves: https://gitlab.gnome.org/GNOME/pango/-/issues/652 Signed-off-by: Simon McVittie <smcv@debian.org>
* layout: Make sloped carets work betterMatthias Clasen2022-01-031-1/+4
| | | | | | | | When the font matrix has uneven scales, we need to factor that into the slope that we get from the font metrics. Tested with a condensed italic Cantarell.
* Merge branch 'matthiasc/for-main' into 'main'Matthias Clasen2022-01-021-0/+1
|\ | | | | | | | | Add a test for letterspacing See merge request GNOME/pango!570
| * Turn off hlig too when letterspacingMatthias Clasen2022-01-021-0/+1
| | | | | | | | Just for completeness.
* | Pass synthetic slant to harfbuzzsynthetic-slantMatthias Clasen2022-01-021-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | When our font matrix includes a slant, pass that information to HarfBuzz, so it can adjust its mark positioning, metrics like caret slope, etc. This commit corrects the code that pulls the font matrix out of fontconfig to properly take the flipped y axis between fontconfig and pango into account. Requires new api in HarfBuzz > 3.2
* | Add pango_matrix_get_slant_ratioMatthias Clasen2022-01-022-0/+36
|/ | | | | Add API to extract the slant ratio from a PangoMatrix. Tests included.
* font: Documentation additions and clarificationsMatthias Clasen2022-01-011-3/+9
| | | | | Face names are not actually guaranteed to be unique, so don't say that.