├── .gitignore
├── tests
├── markups
│ ├── valid-15.markup
│ ├── fail-34.markup
│ ├── fail-35.markup
│ ├── fail-36.markup
│ ├── fail-37.markup
│ ├── fail-38.markup
│ ├── fail-39.markup
│ ├── fail-1.markup
│ ├── fail-11.markup
│ ├── fail-13.markup
│ ├── fail-30.markup
│ ├── fail-8.markup
│ ├── valid-13.markup
│ ├── valid-20.markup
│ ├── fail-12.markup
│ ├── fail-14.markup
│ ├── fail-15.markup
│ ├── fail-16.markup
│ ├── fail-17.markup
│ ├── fail-20.markup
│ ├── fail-21.markup
│ ├── fail-22.markup
│ ├── fail-28.markup
│ ├── valid-14.markup
│ ├── valid-21.markup
│ ├── valid-22.markup
│ ├── fail-2.markup
│ ├── fail-23.markup
│ ├── fail-25.markup
│ ├── fail-27.markup
│ ├── fail-31.markup
│ ├── fail-32.markup
│ ├── fail-33.markup
│ ├── fail-34.expected
│ ├── fail-35.expected
│ ├── fail-36.expected
│ ├── fail-37.expected
│ ├── fail-38.expected
│ ├── fail-39.expected
│ ├── fail-4.markup
│ ├── fail-6.expected
│ ├── fail-26.markup
│ ├── fail-29.markup
│ ├── fail-5.markup
│ ├── fail-24.markup
│ ├── fail-3.markup
│ ├── fail-6.markup
│ ├── fail-7.markup
│ ├── valid-17.markup
│ ├── fail-8.expected
│ ├── fail-1.expected
│ ├── valid-23.markup
│ ├── valid-9.markup
│ ├── fail-7.expected
│ ├── valid-2.markup
│ ├── valid-7.markup
│ ├── valid-24.markup
│ ├── valid-1.markup
│ ├── fail-28.expected
│ ├── valid-15.expected
│ ├── fail-25.expected
│ ├── fail-10.expected
│ ├── fail-2.expected
│ ├── fail-20.expected
│ ├── fail-31.expected
│ ├── fail-14.expected
│ ├── fail-15.expected
│ ├── fail-22.expected
│ ├── fail-23.expected
│ ├── fail-24.expected
│ ├── fail-26.expected
│ ├── fail-4.expected
│ ├── fail-9.expected
│ ├── fail-11.expected
│ ├── fail-29.expected
│ ├── fail-32.expected
│ ├── fail-33.expected
│ ├── fail-5.expected
│ ├── fail-12.expected
│ ├── fail-3.expected
│ ├── fail-30.expected
│ ├── valid-4.markup
│ ├── fail-16.expected
│ ├── fail-17.expected
│ ├── valid-19.markup
│ ├── fail-13.expected
│ ├── fail-21.expected
│ ├── fail-27.expected
│ ├── valid-5.markup
│ ├── valid-17.expected
│ ├── valid-21.expected
│ ├── valid-6.markup
│ ├── valid-16.markup
│ ├── valid-22.expected
│ ├── valid-20.expected
│ ├── valid-9.expected
│ ├── valid-12.markup
│ ├── valid-13.expected
│ ├── valid-19.expected
│ ├── valid-23.expected
│ ├── valid-14.expected
│ ├── valid-24.expected
│ ├── valid-7.expected
│ ├── valid-18.markup
│ ├── fail-10.markup
│ ├── fail-9.markup
│ ├── valid-1.expected
│ ├── valid-2.expected
│ ├── valid-10.markup
│ ├── valid-3.markup
│ ├── valid-11.markup
│ ├── valid-18.expected
│ ├── valid-16.expected
│ ├── valid-3.expected
│ ├── valid-5.expected
│ ├── valid-10.expected
│ ├── valid-6.expected
│ ├── valid-12.expected
│ ├── valid-8.markup
│ ├── valid-4.expected
│ ├── valid-11.expected
│ └── valid-8.expected
├── breaks
│ ├── seven.break
│ ├── sixteen.break
│ ├── five.break
│ ├── eight.break
│ ├── fifteen.break
│ ├── eleven.break
│ ├── one.break
│ ├── ten.break
│ ├── three.break
│ ├── six.break
│ ├── thirteen.break
│ ├── fourteen.break
│ ├── two.break
│ ├── twelve.break
│ ├── seventeen.break
│ ├── nine.break
│ ├── five.expected
│ ├── four.break
│ ├── two.expected
│ ├── fourteen.expected
│ ├── seven.expected
│ ├── ten.expected
│ ├── fifteen.expected
│ ├── one.expected
│ ├── sixteen.expected
│ ├── thirteen.expected
│ ├── three.expected
│ ├── six.expected
│ ├── eleven.expected
│ ├── twelve.expected
│ ├── eight.expected
│ └── seventeen.expected
├── itemize
│ ├── one.items
│ ├── three.items
│ ├── two.items
│ ├── three.expected
│ ├── one.expected
│ └── two.expected
├── fonts
│ ├── boxes.ttf
│ ├── Cantarell-VF.otf
│ ├── DejaVuSans.ttf
│ ├── amiri-06dd.ttf
│ ├── emoji-subset.ttf
│ ├── DejaVuSansMono.ttf
│ ├── fa-solid-f2db.ttf
│ ├── noto-sans-cjk.ttf
│ ├── DejaVuSans-Bold.ttf
│ ├── droid-sans-subset.ttf
│ ├── fa-regular-f2db.ttf
│ ├── README
│ └── fonts.conf
├── fontsets
│ ├── mono
│ ├── mono2
│ ├── cantarell
│ └── cantarell2
├── EmojiBreakTest.txt
├── cxx-test.cpp
├── CharBreakTest.txt
├── gen-all-unicode.c
├── test-common.h
├── gen-all-unicode.py
├── validate-log-attrs.h
├── nofonts
│ └── fonts.conf
├── test-layout2.c
├── testlanguage.c
├── test-harfbuzz.c
└── layouts
│ └── arabic-format.layout
├── docs
├── layout.gif
├── layout.png
├── m-east.png
├── m-west.png
├── rects1.png
├── rects2.png
├── rects3.png
├── blue-text.png
├── m-north.png
├── m-south.png
├── pipeline.png
├── align-left.png
├── align-right.png
├── bidi-input.png
├── layout-dark.png
├── pango-name.png
├── align-center.png
├── arabic-markup.png
├── bidi-annotate.png
├── layout-light.png
├── pipeline-dark.png
├── pipeline-light.png
├── rotated-text.png
├── split-cursor.png
├── vertical-dark.png
├── vertical-light.png
├── bidi-input-dark.png
├── bidi-input-light.png
├── fontmetrics-dark.png
├── pango-name-black.png
├── pango-name-solid.png
├── pango-name-white.png
├── align-left-justify.png
├── align-right-justify.png
├── baseline-shift-dark.png
├── bidi-annotate-dark.png
├── bidi-annotate-light.png
├── caret-metrics-dark.png
├── caret-metrics-light.png
├── fontmetrics-light.png
├── split-cursor-dark.png
├── split-cursor-light.png
├── align-center-justify.png
├── baseline-shift-light.png
├── cursor-positions-dark.png
├── cursor-positions-light.png
├── glyphstring-positions-dark.png
├── glyphstring-positions-light.png
├── tools.md
├── urlmap.js
├── pango-list.rst
├── pangoot.toml.in
├── pango-segmentation.rst
├── pangoft2.toml.in
├── pangofc.toml.in
├── pangoxft.toml.in
├── pangocairo.toml.in
├── pango_xft.md
├── pango_rendering.md
└── pango.types.in
├── pango
├── pangoxft.rc.in
├── pango-features.h.meson
├── pango-enum-types.h.template
├── pango-enum-types.c.template
├── pango.rc.in
├── pangocairo.rc.in
├── pangoft2.rc.in
├── pangowin32.rc.in
├── pango-trace.c
├── pango-fontset-simple-private.h
├── pangocairo-fc-private.h
├── pango-context-private.h
├── pango-trace-private.h
├── pango-script-private.h
├── pangocoretext.h
├── pango-fontmap-private.h
├── pango-attributes-private.h
├── pango-utils-internal.h
├── pango-emoji-private.h
├── pango.h
├── pangocairo-coretextfont.h
├── pangocairo-fc.h
├── pangowin32-private.hpp
├── pangocairo-win32.h
├── pangocairo-coretext.h
├── break-latin.c
├── pangoxft-private.h
├── pango-markup.h
├── pango-color.h
├── pango-engine.c
├── pango-fontset-simple.h
├── pango-coverage-private.h
└── pango-utils-private.h
├── utils
├── viewer-cocoa-icon.png
├── test-color-run.markup
├── test-devanagari.txt
├── test-mixed.txt
├── test-opentype-language.markup
├── viewer-cocoa.gresource.xml
├── test-ipa.txt
├── test-mixed.markup
├── test-latin.txt
├── test-arabic.txt
├── test-syriac.txt
├── test-chinese.txt
├── test-font-variations.markup
├── test-tamil.txt
├── test-tibetan.txt
├── pango-view.c
├── test-justify.txt
├── test-lao.txt
├── test-hyphens.txt
├── test-gurmukhi.txt
├── test-thai.txt
├── test-nko.txt
├── test-hebrew.txt
├── test-mongolian.txt
├── HELLO.txt
├── viewer-cairo.h
├── viewer-cocoa.h
└── viewer-x.h
├── .gitlab-ci
├── list-msys2.sh
├── render-msys2.sh
├── test-msvc.bat
├── run-tests.sh
├── test-msys2.sh
├── fedora.Dockerfile
└── README.md
├── lsan.supp
├── subprojects
├── freetype2.wrap
├── fribidi.wrap
├── harfbuzz.wrap
├── gi-docgen.wrap
├── fontconfig.wrap
├── cairo.wrap
├── sysprof.wrap
├── gobject-introspection.wrap
└── glib.wrap
├── tools
├── meson.build
├── gen-vertical-orientation-U-table.py
├── gen-color-table.pl
└── gen-emoji-table.py
├── THANKS
├── examples
└── meson.build
├── make-release.sh
├── pango.doap
├── meson.options
└── pango.supp
/.gitignore:
--------------------------------------------------------------------------------
1 | /subprojects/*/
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-15.markup:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/breaks/seven.break:
--------------------------------------------------------------------------------
1 | bla
2 | bla
3 |
--------------------------------------------------------------------------------
/tests/markups/fail-34.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-35.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-36.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-37.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-38.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-39.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/breaks/sixteen.break:
--------------------------------------------------------------------------------
1 | hy‧phen|ation overload
2 |
--------------------------------------------------------------------------------
/tests/breaks/five.break:
--------------------------------------------------------------------------------
1 | ab
cd
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-1.markup:
--------------------------------------------------------------------------------
1 | blah
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-11.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-13.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-30.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-8.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-13.markup:
--------------------------------------------------------------------------------
1 | abc _def
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-20.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-12.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-14.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-15.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-16.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-17.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-20.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-21.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-22.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-28.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-14.markup:
--------------------------------------------------------------------------------
1 | _abc _def __x_
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-21.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-22.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/breaks/eight.break:
--------------------------------------------------------------------------------
1 | 200 24.10 99% alpha10beta 100-10 greek-roman
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-2.markup:
--------------------------------------------------------------------------------
1 | Text
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-23.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-25.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-27.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-31.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-32.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-33.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-34.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'boo' on line 1 char 14
--------------------------------------------------------------------------------
/tests/markups/fail-35.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'ick' on line 1 char 14
--------------------------------------------------------------------------------
/tests/markups/fail-36.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'moo' on line 1 char 14
--------------------------------------------------------------------------------
/tests/markups/fail-37.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'su' on line 1 char 13
--------------------------------------------------------------------------------
/tests/markups/fail-38.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'ugh' on line 1 char 14
--------------------------------------------------------------------------------
/tests/markups/fail-39.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'xtra' on line 1 char 15
--------------------------------------------------------------------------------
/tests/markups/fail-4.markup:
--------------------------------------------------------------------------------
1 | Text
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-6.expected:
--------------------------------------------------------------------------------
1 | ERROR: Unknown tag 'tag' on line 1 char 37
--------------------------------------------------------------------------------
/docs/layout.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/layout.gif
--------------------------------------------------------------------------------
/docs/layout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/layout.png
--------------------------------------------------------------------------------
/docs/m-east.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/m-east.png
--------------------------------------------------------------------------------
/docs/m-west.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/m-west.png
--------------------------------------------------------------------------------
/docs/rects1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/rects1.png
--------------------------------------------------------------------------------
/docs/rects2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/rects2.png
--------------------------------------------------------------------------------
/docs/rects3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/rects3.png
--------------------------------------------------------------------------------
/tests/markups/fail-26.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-29.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-5.markup:
--------------------------------------------------------------------------------
1 | Text
2 |
--------------------------------------------------------------------------------
/docs/blue-text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/blue-text.png
--------------------------------------------------------------------------------
/docs/m-north.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/m-north.png
--------------------------------------------------------------------------------
/docs/m-south.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/m-south.png
--------------------------------------------------------------------------------
/docs/pipeline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pipeline.png
--------------------------------------------------------------------------------
/tests/itemize/one.items:
--------------------------------------------------------------------------------
1 | a b
c
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-24.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-3.markup:
--------------------------------------------------------------------------------
1 | Text
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-6.markup:
--------------------------------------------------------------------------------
1 | this is bad
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-7.markup:
--------------------------------------------------------------------------------
1 | text
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-17.markup:
--------------------------------------------------------------------------------
1 | test
2 |
--------------------------------------------------------------------------------
/docs/align-left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-left.png
--------------------------------------------------------------------------------
/docs/align-right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-right.png
--------------------------------------------------------------------------------
/docs/bidi-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-input.png
--------------------------------------------------------------------------------
/docs/layout-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/layout-dark.png
--------------------------------------------------------------------------------
/docs/pango-name.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pango-name.png
--------------------------------------------------------------------------------
/pango/pangoxft.rc.in:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/pango/pangoxft.rc.in
--------------------------------------------------------------------------------
/tests/breaks/fifteen.break:
--------------------------------------------------------------------------------
1 | one two-three four
2 |
--------------------------------------------------------------------------------
/tests/itemize/three.items:
--------------------------------------------------------------------------------
1 | عַرַبִ
2 |
--------------------------------------------------------------------------------
/docs/align-center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-center.png
--------------------------------------------------------------------------------
/docs/arabic-markup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/arabic-markup.png
--------------------------------------------------------------------------------
/docs/bidi-annotate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-annotate.png
--------------------------------------------------------------------------------
/docs/layout-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/layout-light.png
--------------------------------------------------------------------------------
/docs/pipeline-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pipeline-dark.png
--------------------------------------------------------------------------------
/docs/pipeline-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pipeline-light.png
--------------------------------------------------------------------------------
/docs/rotated-text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/rotated-text.png
--------------------------------------------------------------------------------
/docs/split-cursor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/split-cursor.png
--------------------------------------------------------------------------------
/docs/vertical-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/vertical-dark.png
--------------------------------------------------------------------------------
/docs/vertical-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/vertical-light.png
--------------------------------------------------------------------------------
/tests/fonts/boxes.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/boxes.ttf
--------------------------------------------------------------------------------
/docs/bidi-input-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-input-dark.png
--------------------------------------------------------------------------------
/docs/bidi-input-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-input-light.png
--------------------------------------------------------------------------------
/docs/fontmetrics-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/fontmetrics-dark.png
--------------------------------------------------------------------------------
/docs/pango-name-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pango-name-black.png
--------------------------------------------------------------------------------
/docs/pango-name-solid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pango-name-solid.png
--------------------------------------------------------------------------------
/docs/pango-name-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/pango-name-white.png
--------------------------------------------------------------------------------
/tests/breaks/eleven.break:
--------------------------------------------------------------------------------
1 | # Various Emoji sequences
2 | ❤️︎︎👨🦰👨🏿🦱0️⃣🏴🇩🇪️
3 |
--------------------------------------------------------------------------------
/tests/markups/fail-8.expected:
--------------------------------------------------------------------------------
1 | ERROR: Tag 'b' does not support attribute 'attr' on line 1 char 31
--------------------------------------------------------------------------------
/docs/align-left-justify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-left-justify.png
--------------------------------------------------------------------------------
/docs/align-right-justify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-right-justify.png
--------------------------------------------------------------------------------
/docs/baseline-shift-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/baseline-shift-dark.png
--------------------------------------------------------------------------------
/docs/bidi-annotate-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-annotate-dark.png
--------------------------------------------------------------------------------
/docs/bidi-annotate-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/bidi-annotate-light.png
--------------------------------------------------------------------------------
/docs/caret-metrics-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/caret-metrics-dark.png
--------------------------------------------------------------------------------
/docs/caret-metrics-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/caret-metrics-light.png
--------------------------------------------------------------------------------
/docs/fontmetrics-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/fontmetrics-light.png
--------------------------------------------------------------------------------
/docs/split-cursor-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/split-cursor-dark.png
--------------------------------------------------------------------------------
/docs/split-cursor-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/split-cursor-light.png
--------------------------------------------------------------------------------
/tests/breaks/one.break:
--------------------------------------------------------------------------------
1 | # Test breaks around /, soft hyphen, and space.
2 | abc/def ghijkl. Bla
3 |
--------------------------------------------------------------------------------
/tests/breaks/ten.break:
--------------------------------------------------------------------------------
1 | # some special combinations to hit branches in break-indic.c
2 | iක්ක aa்
3 |
--------------------------------------------------------------------------------
/tests/fonts/Cantarell-VF.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/Cantarell-VF.otf
--------------------------------------------------------------------------------
/tests/fonts/DejaVuSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/DejaVuSans.ttf
--------------------------------------------------------------------------------
/tests/fonts/amiri-06dd.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/amiri-06dd.ttf
--------------------------------------------------------------------------------
/tests/fonts/emoji-subset.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/emoji-subset.ttf
--------------------------------------------------------------------------------
/tests/markups/fail-1.expected:
--------------------------------------------------------------------------------
1 | ERROR: Attribute 'foo' is not allowed on the tag on line 1 char 25
--------------------------------------------------------------------------------
/tests/markups/valid-23.markup:
--------------------------------------------------------------------------------
1 | test test
2 |
--------------------------------------------------------------------------------
/utils/viewer-cocoa-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/utils/viewer-cocoa-icon.png
--------------------------------------------------------------------------------
/docs/align-center-justify.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/align-center-justify.png
--------------------------------------------------------------------------------
/docs/baseline-shift-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/baseline-shift-light.png
--------------------------------------------------------------------------------
/docs/cursor-positions-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/cursor-positions-dark.png
--------------------------------------------------------------------------------
/tests/fonts/DejaVuSansMono.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/DejaVuSansMono.ttf
--------------------------------------------------------------------------------
/tests/fonts/fa-solid-f2db.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/fa-solid-f2db.ttf
--------------------------------------------------------------------------------
/tests/fonts/noto-sans-cjk.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/noto-sans-cjk.ttf
--------------------------------------------------------------------------------
/docs/cursor-positions-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/cursor-positions-light.png
--------------------------------------------------------------------------------
/tests/breaks/three.break:
--------------------------------------------------------------------------------
1 | # test breaks around line separator and zero-width joiner
2 | one two
red bluegreen
3 |
--------------------------------------------------------------------------------
/tests/fonts/DejaVuSans-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/DejaVuSans-Bold.ttf
--------------------------------------------------------------------------------
/tests/fonts/droid-sans-subset.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/droid-sans-subset.ttf
--------------------------------------------------------------------------------
/tests/fonts/fa-regular-f2db.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/tests/fonts/fa-regular-f2db.ttf
--------------------------------------------------------------------------------
/docs/glyphstring-positions-dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/glyphstring-positions-dark.png
--------------------------------------------------------------------------------
/tests/breaks/six.break:
--------------------------------------------------------------------------------
1 | a file:///ho/bo-mo/Bla-txt file
2 |
--------------------------------------------------------------------------------
/tests/breaks/thirteen.break:
--------------------------------------------------------------------------------
1 | # some line breaks remain in words
2 | a absp defg b
3 |
--------------------------------------------------------------------------------
/tests/markups/valid-9.markup:
--------------------------------------------------------------------------------
1 | Blue text
2 |
--------------------------------------------------------------------------------
/docs/glyphstring-positions-light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GNOME/pango/HEAD/docs/glyphstring-positions-light.png
--------------------------------------------------------------------------------
/tests/markups/fail-7.expected:
--------------------------------------------------------------------------------
1 | ERROR: Attribute 'weight' occurs twice on tag on line 1 char 44, may only occur once
--------------------------------------------------------------------------------
/tests/markups/valid-2.markup:
--------------------------------------------------------------------------------
1 | Blue text is cool!
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-7.markup:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 |
--------------------------------------------------------------------------------
/tests/breaks/fourteen.break:
--------------------------------------------------------------------------------
1 | # item-spanning line break attrs
2 | abc αβγ
3 |
--------------------------------------------------------------------------------
/tests/markups/valid-24.markup:
--------------------------------------------------------------------------------
1 | straße up, up and away
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-1.markup:
--------------------------------------------------------------------------------
1 | Blue text is cool!
2 |
--------------------------------------------------------------------------------
/tests/markups/fail-28.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'dotted' is not a valid value for the 'overline' attribute on tag, line 1; valid values are none/single
--------------------------------------------------------------------------------
/tests/markups/valid-15.expected:
--------------------------------------------------------------------------------
1 |
2 |
3 | ---
4 |
5 | range 0 2147483647
6 |
7 |
8 | ---
9 |
10 | [0:2147483647] (null) Normal
11 |
--------------------------------------------------------------------------------
/tests/markups/fail-25.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'alpha' attribute on tag on line 1 could not be parsed; should be an integer, not '9999999999999'
--------------------------------------------------------------------------------
/tests/markups/fail-10.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'fallback' attribute on tag line 11 should have one of 'true/yes/t/y' or 'false/no/f/n': 'x' is not valid
--------------------------------------------------------------------------------
/tests/markups/fail-2.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'foreground' attribute on tag on line 1 could not be parsed; should be a color specification, not '#23456'
--------------------------------------------------------------------------------
/tests/markups/fail-20.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'fancy' is not a valid value for the 'variant' attribute on tag, line 1; valid values are 'normal', 'smallcaps'
--------------------------------------------------------------------------------
/tests/markups/fail-31.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'blue' is not a valid value for the 'gravity_hint' attribute on tag, line 1; valid values are natural/strong/line
--------------------------------------------------------------------------------
/utils/test-color-run.markup:
--------------------------------------------------------------------------------
1 |
2 | بهداد
3 |
--------------------------------------------------------------------------------
/.gitlab-ci/list-msys2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | PATH=_build/pango:$PATH _build/utils/pango-list --verbose --metrics > _build/fontlist.txt || true
6 |
--------------------------------------------------------------------------------
/tests/markups/fail-14.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'moon' is not a valid value for the 'gravity' attribute on tag, line 1; valid values are south/east/north/west/auto
--------------------------------------------------------------------------------
/tests/markups/fail-15.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'funny' is not a valid value for the 'style' attribute on tag, line 1; valid values are 'normal', 'oblique', 'italic'
--------------------------------------------------------------------------------
/tests/markups/fail-22.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'foreground' attribute on tag on line 1 could not be parsed; should be a color specification, not 'shubidoo'
--------------------------------------------------------------------------------
/tests/markups/fail-23.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'background' attribute on tag on line 1 could not be parsed; should be a color specification, not 'shubidoo'
--------------------------------------------------------------------------------
/tests/markups/fail-24.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'letter_spacing' attribute on tag on line 1 could not be parsed; should be an integer, not '9999999999999'
--------------------------------------------------------------------------------
/tests/markups/fail-26.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'background_alpha' attribute on tag on line 1 could not be parsed; should be an integer, not '9999999999999'
--------------------------------------------------------------------------------
/tests/markups/fail-4.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'underline_color' attribute on tag on line 1 could not be parsed; should be a color specification, not '#2345'
--------------------------------------------------------------------------------
/tests/markups/fail-9.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'strikethrough' attribute on tag line 11 should have one of 'true/yes/t/y' or 'false/no/f/n': 'x' is not valid
--------------------------------------------------------------------------------
/tests/breaks/two.break:
--------------------------------------------------------------------------------
1 | # Example from https://gitlab.gnome.org/GNOME/pango/issues/218
2 | # This shows difference between word start/end and boundary
3 | goril‧les
4 |
--------------------------------------------------------------------------------
/tests/markups/fail-11.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'rise' attribute on tag on line 1 could not be parsed; should be an integer, or a string such as '5.5pt', not 'sky'
--------------------------------------------------------------------------------
/tests/markups/fail-29.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'overline_color' attribute on tag on line 1 could not be parsed; should be a color specification, not 'rgb(1,2,3)'
--------------------------------------------------------------------------------
/tests/markups/fail-32.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'insert_hyphens' attribute on tag line 1 should have one of 'true/yes/t/y' or 'false/no/f/n': 'blue' is not valid
--------------------------------------------------------------------------------
/tests/markups/fail-33.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'allow_breaks' attribute on tag line 1 should have one of 'true/yes/t/y' or 'false/no/f/n': 'blue' is not valid
--------------------------------------------------------------------------------
/tests/markups/fail-5.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'strikethrough_color' attribute on tag on line 1 could not be parsed; should be a color specification, not 'rot'
--------------------------------------------------------------------------------
/tests/markups/fail-12.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'alpha' attribute on tag on line 1 could not be parsed; should be between 0 and 65536 or a percentage, not 'seethru'
--------------------------------------------------------------------------------
/tests/markups/fail-3.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'foreground' attribute on tag on line 1 could not be parsed; should be a color specification, not '#2222333344445555a'
--------------------------------------------------------------------------------
/tests/markups/fail-30.expected:
--------------------------------------------------------------------------------
1 | ERROR: Value of 'size' attribute on tag on line 1 could not be parsed; should be an integer, or a string such as 'small', not 'blue'
--------------------------------------------------------------------------------
/tests/markups/valid-4.markup:
--------------------------------------------------------------------------------
1 | bold big italic strikethroughsub smallsup tt underline
2 |
--------------------------------------------------------------------------------
/.gitlab-ci/render-msys2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | PATH=_build/pango:$PATH _build/utils/pango-view --no-display --output _build/hello.png utils/HELLO.txt || true
6 |
--------------------------------------------------------------------------------
/tests/markups/fail-16.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'over' is not a valid value for the 'weight' attribute on tag, line 1; valid values are for example 'light', 'ultrabold' or a number
--------------------------------------------------------------------------------
/tests/markups/fail-17.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'auto' is not a valid value for the 'gravity' attribute on tag, line 1; valid values are for example 'south', 'east', 'north', 'west'
--------------------------------------------------------------------------------
/tests/markups/valid-19.markup:
--------------------------------------------------------------------------------
1 | test
6 |
--------------------------------------------------------------------------------
/tests/breaks/twelve.break:
--------------------------------------------------------------------------------
1 | # test line break attributes
2 | the file /path/to/my/home is cursed.
3 |
--------------------------------------------------------------------------------
/tests/markups/fail-13.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'all' is not a valid value for the 'show' attribute on tag, line 1; valid values are none/spaces/line-breaks/ignorables or combinations with |
--------------------------------------------------------------------------------
/tests/markups/fail-21.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'ultra' is not a valid value for the 'stretch' attribute on tag, line 1; valid values are for example 'condensed', 'ultraexpanded', 'normal'
--------------------------------------------------------------------------------
/lsan.supp:
--------------------------------------------------------------------------------
1 | leak:g_quark_init
2 | leak:libfontconfig.so
3 | leak:libcairo.so
4 | leak:libpixman-1.so
5 | leak:libthai.so
6 | leak:libdatrie.so
7 | leak:libxml2.so
8 | leak:hb_font_funcs_create
9 |
--------------------------------------------------------------------------------
/utils/test-devanagari.txt:
--------------------------------------------------------------------------------
1 | कि KI
2 | किकि KIKI
3 | क्कि KKI
4 | क्क्कि KKKI
5 | क््कि KKI (sp)
6 | क़्कि KKI (sp)
7 | क््क्कि KKKI (sp)
8 | क््क््कि KKKI (sp)
9 | क़्क़्कि KKKI (sp)
10 |
--------------------------------------------------------------------------------
/utils/test-mixed.txt:
--------------------------------------------------------------------------------
1 | 你好,这是中文竖排测试。
2 | 欢迎来到中国北京。
3 | 白日依山尽,
4 | Roses are Red,
5 | Grass is Green. 2006
6 | Arabic is گلها قرمزند،
7 | چمن سبز. ۲۰۰۶
8 | ABC 白日依山尽, 2006
9 | 「ノートを買った。」
10 |
--------------------------------------------------------------------------------
/tests/breaks/seventeen.break:
--------------------------------------------------------------------------------
1 | És una prova d'instal·lació
2 | És una prova d'instal·lació
3 | És una prova d'instal·lació
4 |
--------------------------------------------------------------------------------
/tests/markups/fail-27.expected:
--------------------------------------------------------------------------------
1 | ERROR: 'dotted' is not a valid value for the 'underline' attribute on tag, line 1; valid values are none/single/double/low/error/single-line/double-line/error-line
--------------------------------------------------------------------------------
/subprojects/freetype2.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = freetype
3 | url = https://gitlab.freedesktop.org/freetype/freetype.git
4 | revision = VER-2-11-0
5 |
6 | [provide]
7 | dependency_names = freetype2
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-5.markup:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 |
--------------------------------------------------------------------------------
/tests/markups/valid-17.expected:
--------------------------------------------------------------------------------
1 | test
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | 0 4 show 3
8 | range 4 2147483647
9 |
10 |
11 | ---
12 |
13 | [0:4] (null) Normal
14 | [4:2147483647] (null) Normal
15 |
--------------------------------------------------------------------------------
/tests/markups/valid-21.expected:
--------------------------------------------------------------------------------
1 | test
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | 0 4 rise 2560
8 | range 4 2147483647
9 |
10 |
11 | ---
12 |
13 | [0:4] (null) Normal
14 | [4:2147483647] (null) Normal
15 |
--------------------------------------------------------------------------------
/tests/markups/valid-6.markup:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 |
--------------------------------------------------------------------------------
/tests/markups/valid-16.markup:
--------------------------------------------------------------------------------
1 | larger and smaller and smaller now with base
2 |
--------------------------------------------------------------------------------
/tests/markups/valid-22.expected:
--------------------------------------------------------------------------------
1 | test
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | 0 4 rise -5000
8 | range 4 2147483647
9 |
10 |
11 | ---
12 |
13 | [0:4] (null) Normal
14 | [4:2147483647] (null) Normal
15 |
--------------------------------------------------------------------------------
/tests/markups/valid-20.expected:
--------------------------------------------------------------------------------
1 | test
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | 0 4 size 20480
8 | range 4 2147483647
9 |
10 |
11 | ---
12 |
13 | [0:4] (null) Normal 20
14 | [4:2147483647] (null) Normal 20
15 |
--------------------------------------------------------------------------------
/utils/test-opentype-language.markup:
--------------------------------------------------------------------------------
1 | Rendering U+0431 CYRILLIC SMALL LETTER BE
2 | using DejaVu Sans:
3 |
4 | Russian: б
5 | Serbian: б
6 |
7 |
--------------------------------------------------------------------------------
/utils/viewer-cocoa.gresource.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | viewer-cocoa-icon.png
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/markups/valid-9.expected:
--------------------------------------------------------------------------------
1 | Blue text
2 |
3 |
4 | ---
5 |
6 | range 0 9
7 | 0 9 font-features "kern 0, dlig, lnum 1, -pnum"
8 | range 9 2147483647
9 |
10 |
11 | ---
12 |
13 | [0:9] (null) Normal
14 | [9:2147483647] (null) Normal
15 |
--------------------------------------------------------------------------------
/subprojects/fribidi.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = fribidi
3 | url = https://github.com/fribidi/fribidi.git
4 | push-url = git@github.com:fribidi/fribidi.git
5 | revision = master
6 | depth = 1
7 |
8 | [provide]
9 | dependency_names = fribidi
10 |
--------------------------------------------------------------------------------
/subprojects/harfbuzz.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = harfbuzz
3 | url = https://github.com/harfbuzz/harfbuzz.git
4 | push-url = git@github.com:harfbuzz/harfbuzz.git
5 | revision = main
6 | depth = 1
7 |
8 | [provide]
9 | harfbuzz = libharfbuzz_dep
10 |
--------------------------------------------------------------------------------
/tests/fontsets/mono:
--------------------------------------------------------------------------------
1 | Monospace 20
2 |
3 | DejaVu Sans Mono 20
4 | DejaVu Sans 20
5 | Noto Sans CJK JP 20
6 | Droid Sans Japanese 20
7 | Cantarell 20
8 | Amiri 20
9 | DejaVu Sans Bold 20
10 | Font Awesome 5 Free Solid Heavy 20
11 | Noto Color Emoji 20
12 |
--------------------------------------------------------------------------------
/tests/fontsets/mono2:
--------------------------------------------------------------------------------
1 | monospace 20
2 |
3 | DejaVu Sans Mono 20
4 | DejaVu Sans 20
5 | Noto Sans CJK JP 20
6 | Droid Sans Japanese 20
7 | Cantarell 20
8 | Amiri 20
9 | DejaVu Sans Bold 20
10 | Font Awesome 5 Free Solid Heavy 20
11 | Noto Color Emoji 20
12 |
--------------------------------------------------------------------------------
/tests/itemize/two.items:
--------------------------------------------------------------------------------
1 | # test that font_features attributes don't break the
2 | # runs anymore (but other attributes do)
3 | one two two three
4 |
--------------------------------------------------------------------------------
/utils/test-ipa.txt:
--------------------------------------------------------------------------------
1 | n̩ a̩ m̩ w̩ i̩ l̩ j̩̩ ɳ̩ ŋ̩
2 | n̽ a̽ m̽ w̽ i̽ l̽ j̽ ɳ̽ ŋ̽
3 | ff fi fl e˥˩ i˦˨˥
4 | ä̃́ ɛ̃̈̀ ɩ̂́ ɔ̃̂ ʉ̄̈ ɠ̪̥̈
5 | ŋ̥ n̥ n̪̰
6 | k͡p m͡i l͡w l͡i m͡w
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/fontsets/cantarell:
--------------------------------------------------------------------------------
1 | Cantarell 11
2 |
3 | Cantarell 11
4 | DejaVu Sans 11
5 | DejaVu Sans Mono 11
6 | Noto Sans CJK JP 11
7 | Droid Sans Japanese 11
8 | Amiri 11
9 | DejaVu Sans Bold 11
10 | Font Awesome 5 Free Solid Heavy 11
11 | Noto Color Emoji 11
12 |
--------------------------------------------------------------------------------
/tests/breaks/nine.break:
--------------------------------------------------------------------------------
1 | # indic
2 | मी काच खाऊ शकतो, मला ते दुखत नाह
3 | मैं काँच खा सकता हूँ, मुझे उस से कोई पीडा नहीं होत
4 | நான் கண்ணாடி சாப்பிடுவேன், அதனால் எனக்கு ஒரு கேடும் வராத
5 | ﻢﯾں ﮎﺎﻨﭼ ﮎھﺍ ﺲﮑﺗﺍ ہﻭں ﺍﻭﺭ ﻢﺟھے ﺖﮑﻠﯿﻓ ﻥہﯼں ہﻮﺘﯾ
6 | ﺰﻫ ﺶﻴﺸﻫ ﺥﻭړﻝې ﺶﻣ، ﻪﻐﻫ ﻡﺍ ﻦﻫ ﺥﻭږﻮﻳ
7 |
--------------------------------------------------------------------------------
/subprojects/gi-docgen.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = gi-docgen
3 | url = https://gitlab.gnome.org/GNOME/gi-docgen.git
4 | push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/gi-docgen.git
5 | revision = main
6 | depth = 1
7 |
8 | [provide]
9 | program_names = gi-docgen
10 |
--------------------------------------------------------------------------------
/tests/fontsets/cantarell2:
--------------------------------------------------------------------------------
1 | Cantarell Bold 11
2 |
3 | Cantarell Bold 11
4 | DejaVu Sans Bold 11
5 | Font Awesome 5 Free Solid Heavy 11
6 | DejaVu Sans 11
7 | DejaVu Sans Mono 11
8 | Noto Sans CJK JP 11
9 | Droid Sans Japanese 11
10 | Amiri 11
11 | Noto Color Emoji 11
12 |
--------------------------------------------------------------------------------
/tests/markups/valid-12.markup:
--------------------------------------------------------------------------------
1 | overline
2 | overline-color
3 | single-line
4 | double-line
5 | error-line
6 |
--------------------------------------------------------------------------------
/tests/markups/valid-13.expected:
--------------------------------------------------------------------------------
1 | abc def
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | range 4 5
8 | 4 5 underline low
9 | range 5 2147483647
10 |
11 |
12 | ---
13 |
14 | [0:4] (null) Normal
15 | [4:5] (null) Normal
16 | [5:2147483647] (null) Normal
17 |
18 |
19 | ---
20 |
21 | d
--------------------------------------------------------------------------------
/subprojects/fontconfig.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = fontconfig
3 | url = https://gitlab.freedesktop.org/fontconfig/fontconfig
4 | push-url = git@gitlab.freedesktop.org:fontconfig/fontconfig.git
5 | depth = 1
6 | revision = 2.17.0
7 |
8 | [provide]
9 | fontconfig = fontconfig_dep
10 |
--------------------------------------------------------------------------------
/docs/tools.md:
--------------------------------------------------------------------------------
1 | Title: Tools and Demos
2 |
3 | Pango ships with a number of tools and demos that come with their own
4 | documentation in the form of man pages.
5 |
6 | - [pango-view](pango-view.html)
7 | - [pango-list](pango-list.html)
8 | - [pango-segmentation](pango-segmentation.html)
9 |
10 |
--------------------------------------------------------------------------------
/subprojects/cairo.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = cairo
3 | url = https://gitlab.freedesktop.org/cairo/cairo.git
4 | push-url = ssh://git@gitlab.freedesktop.org:cairo/cairo.git
5 | revision = master
6 | depth = 1
7 |
8 | [provide]
9 | cairo = libcairo_dep
10 | cairo-gobject = libcairogobject_dep
11 |
--------------------------------------------------------------------------------
/subprojects/sysprof.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = sysprof
3 | url = https://gitlab.gnome.org/GNOME/sysprof.git
4 | push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/sysprof.git
5 | revision = master
6 | depth = 1
7 |
8 | [provide]
9 | dependency_names = sysprof-4, sysprof-capture-4, sysprof-ui-4
10 |
--------------------------------------------------------------------------------
/tests/itemize/three.expected:
--------------------------------------------------------------------------------
1 | عַرַبִ
2 |
3 | Items: عַرַبִ
4 | Chars: 6(0)
5 | Font: Cantarell 11
6 | Script: arabic
7 | Lang: ar
8 | Bidi: 1
9 | Attrs: 0 12 fallback false
10 |
--------------------------------------------------------------------------------
/utils/test-mixed.markup:
--------------------------------------------------------------------------------
1 | 你好,这是中文竖排测试。
2 | 欢迎来到中国北京。
3 | 白日依山尽,
4 | Roses are Red,
5 | Grass is Green. 2006
6 | Arabic is گلها قرمزند،
7 | چمن سبز. ۲۰۰۶
8 | ABC 白日依山尽, 2006
9 | 「ノートを買った。」
10 |
--------------------------------------------------------------------------------
/utils/test-latin.txt:
--------------------------------------------------------------------------------
1 | 'Twas brillig, and the slithy toves
2 | Did gyre and gimble in the wabe;
3 | All mimsy were the borogoves,
4 | And the mome raths outgrabe.
5 |
6 | 'Beware the Jabberwock, my son!
7 | The jaws that bite, the claws that catch!
8 | Beware the Jubjub bird, and shun
9 | The frumious Bandersnatch!'
10 |
--------------------------------------------------------------------------------
/tests/markups/valid-19.expected:
--------------------------------------------------------------------------------
1 | test
2 |
3 |
4 | ---
5 |
6 | range 0 4
7 | 0 4 family "Times"
8 | 0 4 weight bold
9 | 0 4 foreground #ffff00000000
10 | 0 4 letter-spacing 1024
11 | 0 4 insert-hyphens true
12 | range 4 2147483647
13 |
14 |
15 | ---
16 |
17 | [0:4] (null) Times Bold
18 | [4:2147483647] (null) Times Bold
19 |
--------------------------------------------------------------------------------
/utils/test-arabic.txt:
--------------------------------------------------------------------------------
1 | بِسْمِ ٱللّٰهِ ٱلرَّحْمٰنِ ٱلرَّحِيمِ
2 | اَلْحَمْدُ لِلّٰهِ رَبِّ الْعَالَمِينَ
3 | اَلرَّحْمٰنِ الرَّحِيمِ
4 | مَالِكِ يَوْمِ الدِّينِ
5 | اِيَّاكَ نَعْبُدُ وَ اِيَّاكَ نَسْتَعِينُ
6 | اِهْدِنَا الصِّرَاطَ الْمُسْتَقِيمَ
7 | صِرَاطَ الَّذِينَ اَنْعَمْتَ عَلَيهِمْ غَيْرِ الْمَغْضُوبِ عَلَيْهِم وَ لَا الضَّاۤلِّينَ
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-23.expected:
--------------------------------------------------------------------------------
1 | test test
2 |
3 |
4 | ---
5 |
6 | range 0 5
7 | 0 9 font-desc "Cantarell 11"
8 | range 5 9
9 | 0 9 font-desc "Cantarell 11"
10 | 5 9 scale 2.000000
11 | range 9 2147483647
12 |
13 |
14 | ---
15 |
16 | [0:5] (null) Cantarell 11
17 | [5:9] (null) Cantarell 22
18 | [9:2147483647] (null) Cantarell 22
19 |
--------------------------------------------------------------------------------
/utils/test-syriac.txt:
--------------------------------------------------------------------------------
1 | ܠܫܢܢ
2 | ܒܝܕܦܪܝܕܐ ܒܢܝܡܝܢ ܐܕܡ
3 |
4 | ܐܬܐܡܘܢ ܥܠܝܡܢ ܘܥܠܝܡܬܢ
5 | ܠܫܢܢ ܡܪܢܝܐ
6 | ܦܪܝܣܐ ܡܕܘܪܐ ܩܕܡܝܐ
7 |
8 | ܠܫܢܢ ܝܠܗ ܐܝܬܘܬܢ
9 | ܘܬܘܕܝܬܢ ܘܣܦܪܝܘܬܢ
10 | ܝܠܦܚܠܗ ܒܟܠ ܫܘܒ݂ܗܪܐ
11 |
12 | ܡܒܘܥܐ ܗܘܐ ܕܝܘܠܦܢܐ
13 | ܚܠܝܐ ܒܪܬܡܐ ܘܩܪܝܢܐ
14 | ܬܓ݂ܐ ܝܠܗ ܠܪܫܢ ܪܡܐ
15 |
16 | ܡܠܦܢܢ ܐܢܝ ܓܢܒܪܐ
17 | ܡܫܘܬܐܣܠܗܘܢ ܡܕܪܫܝܬܐ
18 | ܡܫܘܬܐܣܠܗܘܢ ܓܘ ܐܡܘܬܐ
19 |
--------------------------------------------------------------------------------
/pango/pango-features.h.meson:
--------------------------------------------------------------------------------
1 | #ifndef PANGO_FEATURES_H
2 | #define PANGO_FEATURES_H
3 |
4 | #mesondefine PANGO_VERSION_MAJOR
5 | #mesondefine PANGO_VERSION_MINOR
6 | #mesondefine PANGO_VERSION_MICRO
7 |
8 | #define PANGO_VERSION_STRING "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
9 |
10 | #endif /* PANGO_FEATURES_H */
11 |
--------------------------------------------------------------------------------
/tests/breaks/five.expected:
--------------------------------------------------------------------------------
1 | Text: a b [0x2028] c d [0x0a]
2 | Breaks: c c c Lc c c Lc
3 | Whitespace: w w w
4 | Sentences: bs e bs e b
5 | Words: bs be b
6 | Graphemes: b b b b b b b
7 | Hyphens: i i
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-14.expected:
--------------------------------------------------------------------------------
1 | abc def _x_
2 |
3 |
4 | ---
5 |
6 | range 0 1
7 | 0 1 underline low
8 | range 1 4
9 | range 4 5
10 | 4 5 underline low
11 | range 5 2147483647
12 |
13 |
14 | ---
15 |
16 | [0:1] (null) Normal
17 | [1:4] (null) Normal
18 | [4:5] (null) Normal
19 | [5:2147483647] (null) Normal
20 |
21 |
22 | ---
23 |
24 | a
--------------------------------------------------------------------------------
/tests/breaks/four.break:
--------------------------------------------------------------------------------
1 | ภาษาไทย หรือ ภาษาไทยกลาง เป็นภาษาราชการและภาษาประจำชาติของประเทศไทย ภาษาไทยเป็นภาษาในกลุ่มภาษาไทซึ่งเป็นกลุ่มย่อยของตระกูลภาษาขร้า ไท สันนิษฐานว่า ภาษาในตระกูลนี้มีถิ่นกำเนิดจากทางตอนใต้ของประเทศจีน และนักภาษาศาสตร์บางส่วนเสนอว่า ภาษาไทยน่าจะมีความเชื่อมโยงกับตระกูลภาษาออสโตร เอเชียติก ตระกูลภาษาออสโตรนีเซียน และตระกูลภาษาจีน ทิเบต
2 |
--------------------------------------------------------------------------------
/tools/meson.build:
--------------------------------------------------------------------------------
1 | if fontconfig_dep.found()
2 | executable('gen-script-for-lang', 'gen-script-for-lang.c',
3 | dependencies: pango_deps + [ libpango_dep ],
4 | c_args: common_cflags + pango_debug_cflags + [ '-DPANGO_DISABLE_DEPRECATED' ],
5 | include_directories: root_inc,
6 | install: false)
7 | endif
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-24.expected:
--------------------------------------------------------------------------------
1 | straße up, up and away
2 |
3 |
4 | ---
5 |
6 | range 0 7
7 | 0 7 text-transform uppercase
8 | range 7 8
9 | range 8 23
10 | 8 23 text-transform capitalize
11 | range 23 2147483647
12 |
13 |
14 | ---
15 |
16 | [0:7] (null) Normal
17 | [7:8] (null) Normal
18 | [8:23] (null) Normal
19 | [23:2147483647] (null) Normal
20 |
--------------------------------------------------------------------------------
/tests/markups/valid-7.expected:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 |
4 |
5 | ---
6 |
7 | range 0 4
8 | 0 4 underline-color #222233334444
9 | range 4 5
10 | range 5 9
11 | 5 9 strikethrough-color #222233334444
12 | range 9 2147483647
13 |
14 |
15 | ---
16 |
17 | [0:4] (null) Normal
18 | [4:5] (null) Normal
19 | [5:9] (null) Normal
20 | [9:2147483647] (null) Normal
21 |
--------------------------------------------------------------------------------
/tests/breaks/two.expected:
--------------------------------------------------------------------------------
1 | Text: g o r i l ‧ l e s [0x0a]
2 | Breaks: c c c c c c lc c c c Lc
3 | Whitespace: w w
4 | Sentences: bs e b
5 | Words: bs e s be b
6 | Graphemes: b b b b b b b b b b b
7 | Hyphens: i i i i ri i i
8 |
--------------------------------------------------------------------------------
/tests/breaks/fourteen.expected:
--------------------------------------------------------------------------------
1 | Text: a b c [ ] α β γ [0x0a]
2 | Breaks: c c Lc
3 | Whitespace: x w w
4 | Sentences: bs e b
5 | Words: bs bse bse be b
6 | Graphemes: b b b b b b b b b
7 | Hyphens: i i i i
8 |
--------------------------------------------------------------------------------
/tests/breaks/seven.expected:
--------------------------------------------------------------------------------
1 | Text: b l a [0x0a] b l a [0x0a]
2 | Breaks: c c c c Lc c c c Lc
3 | Whitespace: w w w
4 | Sentences: bs e bs e b
5 | Words: bs be bs be b
6 | Graphemes: b b b b b b b b b
7 | Hyphens: i i i i
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-18.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
12 |
--------------------------------------------------------------------------------
/tests/markups/fail-10.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
12 |
--------------------------------------------------------------------------------
/tests/markups/fail-9.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
12 |
--------------------------------------------------------------------------------
/tests/markups/valid-1.expected:
--------------------------------------------------------------------------------
1 | Blue text is cool!
2 |
3 |
4 | ---
5 |
6 | range 0 9
7 | 0 9 scale 1.440000
8 | 0 9 foreground #00000000ffff
9 | range 9 13
10 | range 13 17
11 | 13 17 style italic
12 | range 17 2147483647
13 |
14 |
15 | ---
16 |
17 | [0:9] (null) Normal 0
18 | [9:13] (null) Normal 0
19 | [13:17] (null) Italic 0
20 | [17:2147483647] (null) Italic 0
21 |
--------------------------------------------------------------------------------
/tests/markups/valid-2.expected:
--------------------------------------------------------------------------------
1 | Blue text is cool!
2 |
3 |
4 | ---
5 |
6 | range 0 9
7 | 0 9 scale 1.728000
8 | 0 9 foreground #00000000ffff
9 | range 9 13
10 | range 13 17
11 | 13 17 style italic
12 | range 17 2147483647
13 |
14 |
15 | ---
16 |
17 | [0:9] (null) Normal 0
18 | [9:13] (null) Normal 0
19 | [13:17] (null) Italic 0
20 | [17:2147483647] (null) Italic 0
21 |
--------------------------------------------------------------------------------
/utils/test-chinese.txt:
--------------------------------------------------------------------------------
1 | 你好,这是中文竖排测试。
2 | 欢迎来到中国北京。
3 | 白日依山尽,
4 | 黄河入海流。
5 | 欲穷千里目,
6 | 更上一层楼。
7 | 谢谢!
8 |
9 |
10 | 《施氏吃獅子記》
11 |
12 | 有一位住在石室裏的詩人叫施氏,愛吃獅子,決心要吃十隻獅子。
13 | 他常常去市場看獅子。
14 | 十點鐘,剛好有十隻獅子到了市場。
15 | 那時候,剛好施氏也到了市場。
16 | 他看見那十隻獅子,便放箭,把那十隻獅子殺死了。
17 | 他拾起那十隻獅子的屍體,帶到石室。
18 | 石室濕了水,施氏叫侍從把石室擦乾。
19 | 石室擦乾了,他才試試吃那十隻獅子。
20 | 吃的時候,才發現那十隻獅子,原來是十隻石頭的獅子屍體。
21 | 試試解釋這件事吧。
22 |
--------------------------------------------------------------------------------
/tests/markups/valid-10.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
12 |
--------------------------------------------------------------------------------
/tests/markups/valid-3.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
13 |
--------------------------------------------------------------------------------
/tests/markups/valid-11.markup:
--------------------------------------------------------------------------------
1 | Lots of attrs
12 |
--------------------------------------------------------------------------------
/utils/test-font-variations.markup:
--------------------------------------------------------------------------------
1 | Rendering Text using weight variations.
2 | This works with fonts that have OpenType
3 | font variations.
4 | Weight: 700
5 | Weight: 600
6 | Weight: 300
7 | Weight: 500
8 | Weight: 400
9 | Weight: 2000
10 |
--------------------------------------------------------------------------------
/THANKS:
--------------------------------------------------------------------------------
1 | Abigail Brady (Indic shapers)
2 | Hans Breuer (Windows backend)
3 | Matthias Clasen (Documentation)
4 | Sivaraj Doddannan (Tamil shaper)
5 | Behdad Esfahbod
6 | Dov Grobgeld (Hebrew shaper)
7 | Karl Koehler (Arabic shaper)
8 | Alex Larsson (FreeType and Windows backends)
9 | Tor Lillqvist (FreeType and Windows backends)
10 | Changwoo Ryu (Hangul shaper)
11 | Havoc Pennington
12 | Roozbeh Pournader (Arabic shaper)
13 | Chookij Vanatham (Hebrew shaper)
14 |
--------------------------------------------------------------------------------
/utils/test-tamil.txt:
--------------------------------------------------------------------------------
1 | முருகன் அல்லது அழகு
2 | திரு வி.க.
3 |
4 | குமரகுருபரர்
5 |
6 | உலகு குளிர எமது மதியில் ஒழுகு மமுத கிரணமே
7 | உருகு மடிய ரிதய நெகிழ உணர்வி லெழுந லுதயமே
8 | கலையு நிறைவு மறிவு முதிர முதிரு மதுர நறவமே
9 | கழுவு துகளர் முழுக நெடிய கருணை பெருகு சலதியே
10 | அலகில் புவன முடியும் வெளியில் அளியு மொளியி னிலயமே
11 | அறிவு ளறிவை யறிவு மவரும் அறிய வரிய பிரமமே
12 | மலையின் மகள்கண் மணியை யனைய மதலை வருக வருகவே
13 | வளமை தழுவு பரிதி புரியின் மருவு குமரன் வருகவே
14 |
--------------------------------------------------------------------------------
/docs/urlmap.js:
--------------------------------------------------------------------------------
1 | // SPDX-FileCopyrightText: 2021 GNOME Foundation
2 | // SPDX-License-Identifier: LGPL-2.1-or-later
3 |
4 | // A map between namespaces and base URLs for their online documentation
5 | baseURLs = [
6 | [ 'GLib', 'https://docs.gtk.org/glib/' ],
7 | [ 'GObject', 'https://docs.gtk.org/gobject/' ],
8 | [ 'Gio', 'https://docs.gtk.org/gio/' ],
9 | [ 'Pango', 'https://docs.gtk.org/Pango/' ],
10 | [ 'PangoCairo', 'https://docs.gtk.org/PangoCairo/' ],
11 | ]
12 |
--------------------------------------------------------------------------------
/subprojects/gobject-introspection.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = gobject-introspection
3 | url = https://gitlab.gnome.org/GNOME/gobject-introspection.git
4 | push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/gobject-introspection.git
5 | revision = 1.84.0
6 | depth = 1
7 |
8 | [provide]
9 | dependency_names = gobject-introspection-1.0, gobject-introspection-no-export-1.0
10 | program_names = g-ir-annotation-tool, g-ir-compiler, g-ir-doc-tool, g-ir-generate, g-ir-inspect, g-ir-scanner
11 |
--------------------------------------------------------------------------------
/tests/breaks/ten.expected:
--------------------------------------------------------------------------------
1 | Text: i ක ් [0x200d] ක [ ] a [0x200c] a ் [0x0a]
2 | Breaks: c c c lc c c lc
3 | Whitespace: x w w
4 | Sentences: bs e b
5 | Words: bs be bs be b
6 | Graphemes: b b b b b b b
7 | Hyphens: i i i i i i i
8 |
--------------------------------------------------------------------------------
/subprojects/glib.wrap:
--------------------------------------------------------------------------------
1 | [wrap-git]
2 | directory = glib
3 | url = https://gitlab.gnome.org/GNOME/glib.git
4 | push-url = ssh://git@ssh.gitlab.gnome.org:GNOME/glib.git
5 | revision = main
6 | depth = 1
7 |
8 | [provide]
9 | dependency_names = gthread-2.0, gobject-2.0, gmodule-no-export-2.0, gmodule-export-2.0, gmodule-2.0, glib-2.0, gio-2.0, gio-windows-2.0, gio-unix-2.0
10 | program_names = glib-genmarshal, glib-mkenums, glib-compile-schemas, glib-compile-resources, gio-querymodules, gdbus-codegen
11 |
--------------------------------------------------------------------------------
/tests/EmojiBreakTest.txt:
--------------------------------------------------------------------------------
1 | # As these sequences are not specified in Unicode,
2 | # may change the test cases if needed.
3 |
4 | ÷ 1F3CC × FE0F × 200D × 2642 × FE0F ÷
5 | ÷ 1F3CC × 200D × 2642 ÷
6 | ÷ 1F468 × 200D × 2695 × FE0F ÷ # man health worker
7 | ÷ 1F468 × 1F3FC × 200D × 2695 × FE0F ÷ # man health worker: medium-light skin tone
8 | ÷ 1F468 × 200D × 1F469 × 200D × 1F467 × 200D × 1F466 ÷ # family: man, woman, girl, boy
9 | ÷ 1F1E6 × 1F1FA ÷ # Australia
10 | ÷ 0031 × FE0F × 20E3 ÷ # keycap: 1
11 | # Lines: 7
12 |
--------------------------------------------------------------------------------
/tests/cxx-test.cpp:
--------------------------------------------------------------------------------
1 | /* This test makes sure that all Pango headers can be included
2 | * and compiled in a C++ program.
3 | */
4 |
5 | #include
6 |
7 | #ifdef HAVE_WIN32
8 | #include
9 | #endif
10 |
11 | #ifdef HAVE_XFT
12 | #include
13 | #endif
14 |
15 | #ifdef HAVE_FREETYPE
16 | #include
17 | #endif
18 |
19 | #ifdef HAVE_CAIRO
20 | #include
21 | #endif
22 |
23 | int
24 | main ()
25 | {
26 | return 0;
27 | }
28 |
--------------------------------------------------------------------------------
/utils/test-tibetan.txt:
--------------------------------------------------------------------------------
1 | Regular letters འབྲུག་རྒྱལ་ཁབ་འདི་དགའ་ཏོག་ཏོ་ཡོད།
2 | Reordering of Digits ༡༿༢༿༣༿ Illegal ཀ༿ སྐ༿༾
3 | Digits with other combining marks ༡༾༢༘༤༥༦ Illegal ཀ༘ཁ༙སྐ༘༙
4 | Tsa phru after base ཀ༹ Illegal ཀྱུ༹ ཀི༹
5 | Tsa phru after subjoined སྐ༹ རྒྱ༹
6 | A-Chung ཀཱ ཀྲཱ གླཱ གྱཱ༹ Illegal ཀཱུ ཀཱི
7 | Halanta ཀ྄ ཀ྄ཱ སྐ྄ སྐྱ྄
8 | Vowels ཀྱུ སྐྱིུ ཀྀ ཀེ ཀོ ལྐཻ ཀཽ
9 | Anusvara ཀུཾ ཀིཾ ཀཾི ཀིཾ ཀཾིཾ
10 | Visaraga ཀཿ Illegal ཀ༵ཿ
11 | Lower Stress Mark ཀ༷ ཀཱ༵
12 | Candrabindu ཀྃ ཀིྃ Illegal ཀིྃ
13 |
--------------------------------------------------------------------------------
/tests/fonts/README:
--------------------------------------------------------------------------------
1 | The fonts in this directory are the fonts that areavailable for
2 | test-layout tests.
3 |
4 | Cantarell-VF.otf: Cantarell
5 | DejaVSans.ttf: DejaVu Sans
6 | DejaVSans-Bold.ttf: DejaVu Sans Bold
7 | DejaVSansMono.ttf: DejaVu Sans Mono
8 | emoji-subset.ttf: subset of Noto Color Emoji
9 | droid-sans-subset.ttf: subset of Droid Sans Japanese
10 | amiri-06dd.ttf: subset of Amiri containing U+06dd
11 | fa-regular-f2db.ttf, fa-solid-f2db.ttf: subset of FontAwesome containing U+f2db
12 | noto-sans-cjk.ttf: subset of Noto Sans CJK
13 |
--------------------------------------------------------------------------------
/tests/markups/valid-18.expected:
--------------------------------------------------------------------------------
1 | Lots of attrs
2 |
3 |
4 | ---
5 |
6 | range 0 13
7 | 0 13 font-desc "Sans Italic 12"
8 | 0 13 foreground #0000ffff0000
9 | 0 13 background #f0f0f0f0f0f0
10 | 0 13 underline double
11 | 0 13 underline-color #ffff00000000
12 | 0 13 gravity south
13 | 0 13 gravity-hint strong
14 | 0 13 strikethrough true
15 | 0 13 strikethrough-color #00000000ffff
16 | 0 13 fallback false
17 | 0 13 language de
18 | range 13 2147483647
19 |
20 |
21 | ---
22 |
23 | [0:13] de Sans Italic 12
24 | [13:2147483647] (null) Sans Italic 12
25 |
--------------------------------------------------------------------------------
/utils/pango-view.c:
--------------------------------------------------------------------------------
1 | #include "config.h"
2 | #include "viewer.h"
3 |
4 | extern const PangoViewer pangocairo_viewer;
5 | extern const PangoViewer pangoxft_viewer;
6 | extern const PangoViewer pangoft2_viewer;
7 | extern const PangoViewer pangox_viewer;
8 |
9 | const PangoViewer *viewers[] = {
10 | #ifdef HAVE_CAIRO
11 | &pangocairo_viewer,
12 | #endif
13 | #ifdef HAVE_XFT
14 | &pangoxft_viewer,
15 | #endif
16 | #ifdef HAVE_FREETYPE
17 | &pangoft2_viewer,
18 | #endif
19 | #ifdef HAVE_X
20 | &pangox_viewer,
21 | #endif
22 | NULL
23 | };
24 |
--------------------------------------------------------------------------------
/tests/markups/valid-16.expected:
--------------------------------------------------------------------------------
1 | larger and smaller and smaller now with base
2 |
3 |
4 | ---
5 |
6 | range 0 11
7 | 0 44 scale 1.200000
8 | range 11 19
9 | 11 30 scale 1.000000
10 | range 19 30
11 | 19 30 scale 0.833333
12 | range 30 31
13 | 0 44 scale 1.200000
14 | range 31 44
15 | 0 44 scale 1.200000
16 | 31 44 size 15360
17 | range 44 2147483647
18 |
19 |
20 | ---
21 |
22 | [0:11] (null) Normal 0
23 | [11:19] (null) Normal 0
24 | [19:30] (null) Normal 0
25 | [30:31] (null) Normal 0
26 | [31:44] (null) Normal 18
27 | [44:2147483647] (null) Normal 18
28 |
--------------------------------------------------------------------------------
/tests/itemize/one.expected:
--------------------------------------------------------------------------------
1 | a b
c
2 |
3 | Items: a b |[0x2028] |c
4 | Chars: 3(0) |1(3) |1(4)
5 | Font: Cantarell 11 |Cantarell 11 |Cantarell 11
6 | Script: latin |latin |latin
7 | Lang: en-us |en-us |en-us
8 | Bidi: 0 |0 |0
9 | Attrs: 0 7 fallback false|0 7 fallback false|0 7 fallback false
10 |
--------------------------------------------------------------------------------
/tests/markups/valid-3.expected:
--------------------------------------------------------------------------------
1 | Lots of attrs
2 |
3 |
4 | ---
5 |
6 | range 0 13
7 | 0 13 font-desc "Sans Italic 12"
8 | 0 13 foreground #0000ffff0000
9 | 0 13 background #f0f0f0f0f0f0
10 | 0 13 underline double
11 | 0 13 underline-color #ffff00000000
12 | 0 13 gravity south
13 | 0 13 gravity-hint strong
14 | 0 13 strikethrough true
15 | 0 13 strikethrough-color #00000000ffff
16 | 0 13 fallback false
17 | 0 13 language de
18 | 0 13 allow-breaks true
19 | range 13 2147483647
20 |
21 |
22 | ---
23 |
24 | [0:13] de Sans Italic 12
25 | [13:2147483647] (null) Sans Italic 12
26 |
--------------------------------------------------------------------------------
/tests/markups/valid-5.expected:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 |
6 |
7 | ---
8 |
9 | range 0 4
10 | 0 4 foreground #222233334444
11 | range 4 5
12 | range 5 9
13 | 5 9 foreground #222233334444
14 | range 9 10
15 | range 10 14
16 | 10 14 foreground #222233334444
17 | range 14 15
18 | range 15 19
19 | 15 19 foreground #222233334444
20 | range 19 2147483647
21 |
22 |
23 | ---
24 |
25 | [0:4] (null) Normal
26 | [4:5] (null) Normal
27 | [5:9] (null) Normal
28 | [9:10] (null) Normal
29 | [10:14] (null) Normal
30 | [14:15] (null) Normal
31 | [15:19] (null) Normal
32 | [19:2147483647] (null) Normal
33 |
--------------------------------------------------------------------------------
/tests/markups/valid-10.expected:
--------------------------------------------------------------------------------
1 | Lots of attrs
2 |
3 |
4 | ---
5 |
6 | range 0 13
7 | 0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
8 | 0 13 foreground #0000ffff0000
9 | 0 13 background #f0f0f0f0f0f0
10 | 0 13 underline double
11 | 0 13 underline-color #ffff00000000
12 | 0 13 gravity south
13 | 0 13 gravity-hint strong
14 | 0 13 strikethrough true
15 | 0 13 strikethrough-color #00000000ffff
16 | 0 13 fallback false
17 | 0 13 language de
18 | range 13 2147483647
19 |
20 |
21 | ---
22 |
23 | [0:13] de Sans Italic 12 @wdth=100,wght=200
24 | [13:2147483647] (null) Sans Italic 12 @wdth=100,wght=200
25 |
--------------------------------------------------------------------------------
/tests/CharBreakTest.txt:
--------------------------------------------------------------------------------
1 | # As these sequences are not specified in Unicode,
2 | # may change the test cases if needed.
3 |
4 | ÷ 0025 ÷ 0030 ÷
5 | ÷ 0025 × 0308 ÷ 0030 ÷
6 | ÷ 0024 ÷ 0030 ÷
7 | ÷ 0024 × 0308 ÷ 0030 ÷
8 | ÷ 0028 ÷ 0030 ÷ 002C ÷ 0031 ÷ 0029 ÷ 002B ÷ 0028 ÷ 0032 ÷ 002C ÷ 0033 ÷ 0029 ÷ 2295 ÷ 0028 ÷ 2212 ÷ 0034 ÷ 002C ÷ 0035 ÷ 0029 ÷ 2296 ÷ 0028 ÷ 0036 ÷ 002C ÷ 0037 ÷ 0029 ÷
9 | ÷ 007B ÷ 0030 ÷ 002C ÷ 0031 ÷ 007D ÷ 002B ÷ 007B ÷ 0032 ÷ 002C ÷ 0033 ÷ 007D ÷ 2295 ÷ 007B ÷ 2212 ÷ 0034 ÷ 002C ÷ 0035 ÷ 007D ÷ 2296 ÷ 007B ÷ 0036 ÷ 002C ÷ 0037 ÷ 007D ÷
10 | ÷ 4F8B ÷ FF1A ÷ 00A3 ÷ 0032 ÷ 0033 ÷
11 | # Lines: 7
12 |
--------------------------------------------------------------------------------
/tests/breaks/fifteen.expected:
--------------------------------------------------------------------------------
1 | Text: o n e [ ] t w o - t h r e e [ ] f o [0xad] u r [0x0a]
2 | Breaks: c c c c lc c c c lc c c c c c lc c c lc c c Lc
3 | Whitespace: x x w w
4 | Sentences: bs e b
5 | Words: bs be bs be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/tests/breaks/one.expected:
--------------------------------------------------------------------------------
1 | Text: a b c / d e f [ ] g h i [0xad] j k l . [ ] B l a [0x0a]
2 | Breaks: c c c c lc c c c lc c c c lc c c c c lc c c c Lc
3 | Whitespace: x x w w
4 | Sentences: bs e bs e b
5 | Words: bs be bs be bs be b bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/tests/breaks/sixteen.expected:
--------------------------------------------------------------------------------
1 | Text: h y ‧ p h e n | a t i o n [ ] o v e r [0xad] l o a d [0x0a]
2 | Breaks: c c c lc c c c c lc c c c c c lc c c c c lc c c c c Lc
3 | Whitespace: x w w
4 | Sentences: bs e b
5 | Words: bs e s be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i ri i i i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-6.expected:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 |
6 |
7 | ---
8 |
9 | range 0 4
10 | 0 4 foreground #222233334444
11 | 0 4 foreground-alpha 21845
12 | range 4 5
13 | range 5 9
14 | 5 9 foreground #222233334444
15 | 5 9 foreground-alpha 21845
16 | range 9 10
17 | range 10 14
18 | 10 14 foreground #222233334444
19 | range 14 15
20 | range 15 19
21 | 15 19 foreground #222233334444
22 | 15 19 foreground-alpha 21845
23 | range 19 2147483647
24 |
25 |
26 | ---
27 |
28 | [0:4] (null) Normal
29 | [4:5] (null) Normal
30 | [5:9] (null) Normal
31 | [9:10] (null) Normal
32 | [10:14] (null) Normal
33 | [14:15] (null) Normal
34 | [15:19] (null) Normal
35 | [19:2147483647] (null) Normal
36 |
--------------------------------------------------------------------------------
/tests/breaks/thirteen.expected:
--------------------------------------------------------------------------------
1 | Text: a [ ] a b [0x200b] s p [0x200b] [ ] [ ] d e [0xad] f g [ ] b [0x0a]
2 | Breaks: c c lc c c lc c c c c lc c c lc c c lc c Lc
3 | Whitespace: x x x x w w
4 | Sentences: bs e b
5 | Words: bs be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i
8 |
--------------------------------------------------------------------------------
/.gitlab-ci/test-msvc.bat:
--------------------------------------------------------------------------------
1 | @echo on
2 | :: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
3 | :: specified build architecture
4 | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
5 | @echo on
6 |
7 | :: Tests use the diff utility
8 | set PATH=%PATH%;C:\Program Files\Git\usr\bin
9 |
10 | pip3 install --upgrade --user meson~=1.2 || goto :error
11 | meson setup -Dbackend_max_links=1 -Ddebug=false _build || goto :error
12 | meson compile -C _build || goto :error
13 | meson test -C _build -t "%MESON_TEST_TIMEOUT_MULTIPLIER%" --print-errorlogs --suite pango || goto :error
14 |
15 | exit /b 0
16 |
17 | :error
18 | exit /b 1
19 |
--------------------------------------------------------------------------------
/tests/breaks/three.expected:
--------------------------------------------------------------------------------
1 | Text: o n e [ ] t w o [0x2028] r e d [ ] b l u e [0x200d] g r e e n [0x0a]
2 | Breaks: c c c c lc c c c Lc c c c lc c c c c c c c c c lc
3 | Whitespace: x w x w w
4 | Sentences: bs e bs e b
5 | Words: bs be bs be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/pango/pango-enum-types.h.template:
--------------------------------------------------------------------------------
1 | /*** BEGIN file-header ***/
2 | #ifndef __PANGO_ENUM_TYPES_H__
3 | #define __PANGO_ENUM_TYPES_H__
4 |
5 | #include
6 |
7 | #include
8 |
9 | G_BEGIN_DECLS
10 | /*** END file-header ***/
11 |
12 | /*** BEGIN file-production ***/
13 |
14 | /* enumerations from "@basename@" */
15 | /*** END file-production ***/
16 |
17 | /*** BEGIN value-header ***/
18 | PANGO_AVAILABLE_IN_ALL
19 | GType @enum_name@_get_type (void) G_GNUC_CONST;
20 | #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
21 | /*** END value-header ***/
22 |
23 | /*** BEGIN file-tail ***/
24 | G_END_DECLS
25 |
26 | #endif /* __PANGO_ENUM_TYPES_H__ */
27 | /*** END file-tail ***/
28 |
--------------------------------------------------------------------------------
/tests/markups/valid-12.expected:
--------------------------------------------------------------------------------
1 | overline
2 | overline-color
3 | single-line
4 | double-line
5 | error-line
6 |
7 |
8 | ---
9 |
10 | range 0 8
11 | 0 8 overline single
12 | range 8 9
13 | range 9 23
14 | 9 23 overline-color #ffff00000000
15 | range 23 24
16 | range 24 35
17 | 24 35 underline single-line
18 | range 35 36
19 | range 36 47
20 | 36 47 underline double-line
21 | range 47 48
22 | range 48 58
23 | 48 58 underline error-line
24 | range 58 2147483647
25 |
26 |
27 | ---
28 |
29 | [0:8] (null) Normal
30 | [8:9] (null) Normal
31 | [9:23] (null) Normal
32 | [23:24] (null) Normal
33 | [24:35] (null) Normal
34 | [35:36] (null) Normal
35 | [36:47] (null) Normal
36 | [47:48] (null) Normal
37 | [48:58] (null) Normal
38 | [58:2147483647] (null) Normal
39 |
--------------------------------------------------------------------------------
/utils/test-justify.txt:
--------------------------------------------------------------------------------
1 | Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc sit amet nulla. Cras elit. Fusce nibh orci, vehicula ut, congue ut, auctor quis, turpis.
2 |
3 | Fusce ullamcorper porttitor quam. Nullam at nulla sit amet neque rutrum porttitor. Quisque mattis blandit velit. Aenean nec risus sed libero rhoncus suscipit. Cras dapibus.
4 |
5 | قصابه با بابام رفیقه. پشت خونمون یه دباغیه. اینقده بچه گوسفند توشه! خونهمون ساس داره. ساس کوچیک و سیاس. هر جا بزنه جاش باد میکنه. وقتی داره از دیوار اتاق میره بالا، نمیتونه خودشو نگه داره، میافته رو تن ما، میگیره خونمونو میمکه. یه دفعه همه اثاث مثاثامونو ریختیم بیرون، یه عالمه دوا خریدیم زدیم همه جا: به رختخوابا، زیر زیلو، سوراخ سنبهها. ولی ساسها بیشتر شدن، کمتر نشدن. بابام توی حموم کار میکنه.
6 |
--------------------------------------------------------------------------------
/tests/breaks/six.expected:
--------------------------------------------------------------------------------
1 | Text: a [ ] f i l e : / / / h o / b o - m o / B l a - t x t [ ] f i l e [0x0a]
2 | Breaks: c c lc c c c c c c c lc c c lc c c c c c lc c c c lc c c c lc c c c c Lc
3 | Whitespace: x x w w
4 | Sentences: bs e b
5 | Words: bs be bs be b b b bs bse bse be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/tests/markups/valid-8.markup:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 | Text
6 | Text
7 | Text
8 | Text
9 | Text
10 |
--------------------------------------------------------------------------------
/utils/test-lao.txt:
--------------------------------------------------------------------------------
1 | ເກັບພາບງາມໆມາຝາກໃຫ້ແຟນໆໄດ້ເຫັນເຕັມໆຕາທີ່ມະຫາສານ.ຄອມ
2 | ປະຈຸບັນ, ຕ້ອງຍອມຮັບກັນວ່າ ກະແສຕອບຮັບແນວເພງສະຕິງກຳລັງມາແຮງອີ່ຫລີ, ບາງບົດເພງນອກຈາກຈະເປັນທີ່ນິຍົມໃນບ້ານເຮົາ ເມືອງເຮົາແລ້ວ ຍັງຂ້າມຝັ່ງໄປດັງຢູ່ບ້ານເພີ່ນອີກ. ບໍ່ແມ່ນຕັ້ງເວົ້າ ເມື່ອກ່ອນນັກທ່ອງທ່ຽວຊາວຕ່າງຊາດທີ່ເຂົ້າມາທ່ຽວບ້ານເຮົາເພິ່ນມັກຖາມວ່າ ເປັນຫຍັງຄົນລາວຈຶ່ງບໍ່ມັກເປິດເພງລາວໂດຍສະເພາະໃນຮ້ານກິນດື່ມ, ຮ້ານອາຫານ ຫລື ແມ່ນແຕ່ຕາມບ້ານເຮືອນ ແລະ ຕະຫລາດ, ແຕ່ດຽວນີ້ຂໍປະທານໂທດ ເພິ່ນຫັນມາເປີດເພງລາວກັນແລ້ວ ເນື່ອງຈາກສັງຄົມກໍ່ຍອມຮັບ, ບົດເພງກໍ່ມ່ວນ ເນື້ອຫາກໍ່ຖືກໃຈແຖມຍັງເປັນການສົ່ງເສີມໃຫ້ສິລະປິນລາວ ແລະ ຜູ້ຢູ່ເບື້ອງຫລັງມີກຳລັງໃຈພັດທະນາວຽກ ແລະ ຜົນງານຂອງຕົນອີກ... ອີກດ້ານໜື່ງນອກຈານສິລະປິນຈະຕ້ອງບຸກບືນ ເພື່ອໃຫ້ຕົວເອງໄດ້ເຂົ້າມາຢູ່ໃນວົງການແລ້ວ, ຝ່າຍເຈົ້າຂອງຄ້າຍເພງກໍ່ພະຍາຍາມເຟັ້ນຫານັກຮ້ອງສຽງດີ ມີແວວດັງເຂົ້າມາເປັນສະມາຊິກຂອງຄ້າຍເພງຕົນເອງເຊັ່ນກັນ.
3 |
--------------------------------------------------------------------------------
/.gitlab-ci/run-tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set +x
4 | set +e
5 |
6 | srcdir=$( pwd )
7 | builddir=$1
8 |
9 | # Ignore memory leaks lower in dependencies
10 | export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:symbolize=1
11 | export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
12 |
13 | meson test -C ${builddir} \
14 | --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
15 | --print-errorlogs \
16 | --suite=pango
17 |
18 | # Store the exit code for the CI run, but always
19 | # generate the reports
20 | exit_code=$?
21 |
22 | cd ${builddir}
23 |
24 | ./utils/pango-list --verbose > fontlist.txt
25 | ./tests/test-font -p /pango/font/metrics --verbose
26 | ./utils/pango-view --no-display --output hello.png ${srcdir}/utils/HELLO.txt
27 |
28 | exit $exit_code
29 |
--------------------------------------------------------------------------------
/.gitlab-ci/test-msys2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | if [[ "$MSYSTEM" == "MINGW32" ]]; then
6 | export MSYS2_ARCH="i686"
7 | else
8 | export MSYS2_ARCH="x86_64"
9 | fi
10 |
11 | pacman --noconfirm -Suy
12 |
13 | pacman --noconfirm -S --needed \
14 | base-devel \
15 | mingw-w64-$MSYS2_ARCH-gobject-introspection \
16 | mingw-w64-$MSYS2_ARCH-harfbuzz \
17 | mingw-w64-$MSYS2_ARCH-fontconfig \
18 | mingw-w64-$MSYS2_ARCH-fribidi \
19 | mingw-w64-$MSYS2_ARCH-libthai \
20 | mingw-w64-$MSYS2_ARCH-cairo \
21 | mingw-w64-$MSYS2_ARCH-meson \
22 | mingw-w64-$MSYS2_ARCH-toolchain \
23 | mingw-w64-$MSYS2_ARCH-cantarell-fonts
24 |
25 | meson setup --buildtype debug _build
26 | meson compile -C _build
27 | meson test -C _build -t "$MESON_TEST_TIMEOUT_MULTIPLIER" --print-errorlogs --suite pango
28 |
--------------------------------------------------------------------------------
/docs/pango-list.rst:
--------------------------------------------------------------------------------
1 | .. _pango-list(1):
2 |
3 | ==========
4 | pango-list
5 | ==========
6 |
7 | ----------------------
8 | Pango font enumeration
9 | ----------------------
10 |
11 | :Version: Pango
12 | :Manual section: 1
13 | :Manual group: Pango commands
14 |
15 | SYNOPSIS
16 | --------
17 |
18 | | **pango-list** [OPTIONS...]
19 |
20 | DESCRIPTION
21 | -----------
22 |
23 | ``pango-list`` enumerates fonts using Pangos font map apis.
24 |
25 | HELP OPTIONS
26 | ------------
27 |
28 | ``-h, --help``
29 |
30 | Show help options.
31 |
32 | ``--version``
33 |
34 | Print the command's version and exit.
35 |
36 | APPLICATION OPTIONS
37 | -------------------
38 |
39 | ``--verbose``
40 |
41 | Print verbose information.
42 |
43 | ``--metrics``
44 |
45 | Print font metrics.
46 |
47 | ``--variations``
48 |
49 | Print font variations.
50 |
--------------------------------------------------------------------------------
/examples/meson.build:
--------------------------------------------------------------------------------
1 | examples = []
2 |
3 | if pango_cairo_backends.contains('png')
4 | examples += [
5 | 'cairoshape',
6 | 'cairosimple',
7 | 'cairotwisted',
8 | ]
9 | endif
10 |
11 | examples_deps = [ libpango_dep, libpangocairo_dep, ]
12 |
13 | if pango_font_backends.contains('freetype')
14 | examples_deps += libpangoft2_dep
15 | endif
16 |
17 | # somebody will have to fix this
18 | # if host_system == 'windows'
19 | # # This hasn't been built in years, most likely, but try now
20 | # examples += [ 'pangowin32tobmp' ]
21 | # examples_deps += [ libpangowin32_dep ]
22 | # endif
23 |
24 | foreach e: examples
25 | executable(e, '@0@.c'.format(e),
26 | dependencies: examples_deps + pango_deps,
27 | c_args: common_cflags,
28 | include_directories: root_inc,
29 | install: false)
30 | endforeach
31 |
--------------------------------------------------------------------------------
/tests/breaks/eleven.expected:
--------------------------------------------------------------------------------
1 | Text: ❤️ ︎ ︎ 👨[0x200d] 🦰 👨🏿[0x200d] 🦱 0️ ⃣ 🏴[0xe0075][0xe0073][0xe0063][0xe0061][0xe007f] 🇩🇪️ [0x0a]
2 | Breaks: c lc lc lc lc lc c Lc
3 | Whitespace: w w
4 | Sentences: bs e b
5 | Words: b b b bs be b b b
6 | Graphemes: b b b b b b b b
7 | Hyphens: i i i i i
8 |
--------------------------------------------------------------------------------
/make-release.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | version=$(head -5 meson.build | grep version | sed -e "s/[^']*'//" -e "s/'.*$//")
4 | release_build_dir="release_build"
5 | branch=$(git branch --show-current)
6 |
7 | if [ -d ${release_build_dir} ]; then
8 | echo "Please remove ./${release_build_dir} first"
9 | exit 1
10 | fi
11 |
12 | # make sure included subprojects are current
13 | meson subprojects update gi-docgen
14 |
15 | # make the release tarball
16 | meson setup -Dgtk_doc=true --force-fallback-for gi-docgen ${release_build_dir} || exit
17 | meson compile -C${release_build_dir} || exit
18 | meson dist -C${release_build_dir} --include-subprojects || exit
19 |
20 |
21 | echo -e "\n\nPango ${version} release on branch ${branch} in ./${release_build_dir}/:\n"
22 |
23 | ls -l --sort=time -r "${release_build_dir}/meson-dist"
24 |
25 | echo -e "\nPlease sanity-check these tarballs before uploading them."
26 |
--------------------------------------------------------------------------------
/utils/test-hyphens.txt:
--------------------------------------------------------------------------------
1 | A hyphenation algorithm is a set of rules, especially one codified for implementation in a computer program, that decides at which points a word can be broken over two lines with a hyphen. For example, a hyphenation algorithm might decide that impeachment can be broken as impeach‧ment or im‧peachment but not impe‧achment.
2 |
3 | One of the reasons for the complexity of the rules of wordbreaking is that different "dialects" of English tend to differ on hyphenation [citation needed]: American English tends to work on sound, but British English tends to look to the origins of the word and then to sound. There are also a large number of exceptions, which further complicates matters.
4 |
--------------------------------------------------------------------------------
/tests/breaks/twelve.expected:
--------------------------------------------------------------------------------
1 | Text: t h e [ ] f i l e [ ] / p a t h / t o / m y / h o m e [ ] i s [ ] c u r s e d . [0x0a]
2 | Breaks: c c c c lc c c c c lc c c c c c lc c c lc c c lc c c c c lc c c lc c c c c c c c Lc
3 | Whitespace: x x x x w w
4 | Sentences: bs e b
5 | Words: bs be bs be bs bse bse bse be bs be bs be b b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/utils/test-gurmukhi.txt:
--------------------------------------------------------------------------------
1 | ਹਰੀ ਸਿੰਘ ਨਲੂਆ
2 |
3 | ਹਰੀ ਸਿੰਘ ਨਲੂਆ (ਨਲਵਾ)
4 |
5 |
6 | ਸਿੱਖ ਕੌਮ ਦਾ ਅਣਖੀ ਅਤੇ ਬਹਾਦਰ ਜਰਨੈਲ, ਜਿਸ ਦੇ ਨਾਂ ਤੋਂ ਪਠਾਣੀਆਂ ਆਪਣੇ ਬੱਚਿਆਂ ਨੂੰ ਡਰਾਉਦੀਆਂ ਸਨ ਕਿ ਪੁੱਤ ਸੌਂ ਜਾ ਨਹੀਂ ਤਾਂ ਨਲੂਆ ਆ ਜਾਵੇਗਾ।
7 |
8 |
9 | ਵਿਸ਼ਾ-ਸੂਚੀ
10 | [ਛੁਪਾਓ]
11 |
12 | * ੧ ਜਨਮ ਅਤੇ ਸਿਖਲਾਈ
13 | * ੨ ਨਲੂਆ
14 | * ੩ ਖਾਲਸਾ ਫੌਜ
15 | * ੪ ਕਸ਼ਮੀਰ
16 | * ੫ ਜੰਗ ਜਮਰੌਦ
17 | * ੬ ਜਾਗੀਰ ਵਾਪਸੀ
18 |
19 | ਜਨਮ ਅਤੇ ਸਿਖਲਾਈ
20 |
21 | ਸਰਦਾਰ ਹਰੀ ਸਿੰਘ ਦਾ ਜਨਮ ਗੁੱਜਰਾਵਾਲੇ ਵਿਖੇ ਹੋਇਆ। ਪਿਤਾ ਦੀ ਮੌਤ ਨਿੱਕੀ ਉਮਰ ਵਿੱਚ ਹੋਣ ਉਪਰੰਤ, ਉਹਨਾਂ ਦਾ ਪਾਲਣ ਪੋਸ਼ਣ ਉਹਨਾਂ ਦੇ ਨਾਨਕੇ ਪਰਿਵਾਰ ਵਿੱਚ ਹੋਇਆ।
22 |
23 | ਸਰਦਾਰ ਹਰੀ ਸਿੰਘ ਨਲੂਆ ਦੇ ਪਰਿਵਾਰ ਵਿੱਚ ਦੋ ਪਤਨੀਆਂ, ਜਿੰਨ੍ਹਾਂ ਦਾ ਜ਼ੋਰਾਵਰ ਸਿੰਘ ਤੇ ਗੁਰਦਿੱਤ ਸਿੰਘ, ਅਤੇ ਅਰਜਨ ਸਿੰਘ ਤੇ ਪੰਜਾਬ ਸਿੰਘ ਨਾਂ ਦੇ ਚਾਰ ਪੁੱਤਰ ਸਨ। ਚਾਰੇ ਪੁੱਤਰ ਆਪਣੇ ਪਿਓ ਵਾਂਗ ਬਹਾਦਰ ਨਹੀਂ ਸਨ।
24 | ਇਹਨਾਂ ਕਰਕੇ ਮਹਾਰਾਜਾ ਰਣਜੀਤ ਸਿੰਘ ਨੇ ਅੰਤ ਵਿੱਚ ਸਰਦਾਰ ਹਰੀ ਸਿੰਘ ਦੀ ਸਾਰੀ ਜਾਗੀਰ ਨੂੰ ਵਾਪਸ ਲੈ ਲਈ ਆਪਣੇ ਸਰਦਾਰ ਵਿੱਚ ਵੰਡ ਦਿੱਤੀ।
25 | ਸਰਦਾਰ ਹਰੀ ਸਿੰਘ ਦੇ ਬਾਅਦ ਇਹਨਾਂ ਕੋਲ 40,000 ਹਜ਼ਾਰ ਦੀ ਸਲਾਨਾ ਜਾਗੀਰ ਅਤੇ 60 ਤੋਂ 70 ਸਵਾਰ ਰਹੇ।
26 |
27 |
--------------------------------------------------------------------------------
/utils/test-thai.txt:
--------------------------------------------------------------------------------
1 | ลำดับนั้น เทวดากล่าวคาถากะพระมหาสัตว์ว่า:
2 |
3 | “การงานอันใด ยังไม่ถึงที่สุดด้วยความพยายาม การงานอันนั้นก็ไร้ผล มีความลำบากเกิดขึ้น การทำความพยายามในฐานะอันไม่สมควรใด จนความตายปรากฏขึ้น ความพยายามในฐานะอันไม่สมควรนั้น จะมีประโยชน์อะไร”
4 |
5 | เมื่อนางมณีเมขลากล่าวอย่างนี้แล้ว พระมหาสัตว์เมื่อจะทำนางมณีเมขลาให้จำนนต่อถ้อยคำ จึงได้ตรัสคาถาต่อไปว่า:
6 |
7 | “ดูก่อนเทวดา ผู้ใดรู้แจ้งการงานที่ทำจะไม่ลุล่วงไปได้จริง ๆ ชื่อว่าไม่รักษาชีวิตของตน ถ้าผู้นั้นละความเพียรในฐานะเช่นนั้นเสีย ก็จะพึงรู้ผลแห่งความเกียจคร้าน ดูก่อนเทวดา คนบางพวกในโลกนี้เห็นผลแห่งความประสงค์ของตน จึงประกอบการงานทั้งหลาย การงานเหล่านั้นจะสำเร็จหรือไม่ก็ตาม ดูก่อนเทวดา ท่านก็เห็นผลแห่งกรรมประจักษ์แก่ตนแล้วมิใช่หรือ คนอื่น ๆ จมในมหาสมุทรหมด เราคนเดียวยังว่ายข้ามอยู่ และได้เห็น ท่าน มาสถิตอยู่ใกล้ ๆ เรา เรานั้นจักพยายามตามสติกำลัง จักทำความเพียรที่บุรุษควรทำ ไปให้ถึงฝั่งแห่งมหาสมุทร”
8 |
9 | --
10 | พระมหาชนก
11 | พระราชนิพนธ์ พระบาทสมเด็จพระเจ้าอยู่หัว ภูมิพลอดุลยเดชฯ
12 |
--------------------------------------------------------------------------------
/docs/pangoot.toml.in:
--------------------------------------------------------------------------------
1 | [library]
2 | namespace = "PangoOT"
3 | version = "@PANGO_VERSION@"
4 | browse_url = "https://gitlab.gnome.org/GNOME/pango/"
5 | repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
6 | docs_url = "https://docs.gtk.org/PangoOT"
7 | website_url = "https://www.pango.org"
8 | authors = "Owen Taylor, Behdad Esfahbod"
9 | logo_url = "pango-name.png"
10 | license = "LGPL-2.1-or-later"
11 | description = "OpenType support for Pango"
12 | dependencies = [ "Pango-1.0" ]
13 | devhelp = true
14 | search_index = true
15 |
16 | [dependencies."Pango-1.0"]
17 | name = "Pango"
18 | description = "A library for layout out and rendering of text"
19 | docs_url = "../Pango/"
20 |
21 | [theme]
22 | name = "basic"
23 | show_index_summary = true
24 |
25 | [source-location]
26 | base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/main/"
27 |
28 | [extra]
29 |
30 | content_images = [
31 | "pango-name.png"
32 | ]
33 |
34 | urlmap_file = "urlmap.js"
35 |
--------------------------------------------------------------------------------
/tests/gen-all-unicode.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | int
5 | main (int argc G_GNUC_UNUSED,
6 | char **argv G_GNUC_UNUSED)
7 | {
8 | gunichar i;
9 | gint j;
10 |
11 | /* Output all characters in the BMP twice, once directly
12 | * concatenated, once with spaces between them
13 | */
14 | for (j = 0 ; j < 2 ; j++)
15 | {
16 | for (i = 0; i < 65536; i++)
17 | {
18 | if (g_unichar_validate (i))
19 | {
20 | gchar buffer[7];
21 | int len = g_unichar_to_utf8 (i, buffer);
22 | buffer[len] = '\0';
23 |
24 | if (j == 1)
25 | fputs (" ", stdout);
26 |
27 | fputs (buffer, stdout);
28 |
29 | if (j == 0)
30 | {
31 | if (i % 40 == 0 && i != 0)
32 | fputs ("\n", stdout);
33 | }
34 | else
35 | {
36 | if (i % 20 == 0 && i != 0)
37 | fputs ("\n", stdout);
38 | }
39 | }
40 | }
41 | }
42 | fputs ("\n", stdout);
43 |
44 | return 0;
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/tests/test-common.h:
--------------------------------------------------------------------------------
1 | #ifndef __TEST_COMMON_H__
2 | #define __TEST_COMMON_H__
3 |
4 | char * diff_with_file (const char *file,
5 | char *text,
6 | gssize len,
7 | GError **error);
8 |
9 | char * diff_bytes (GBytes *b1,
10 | GBytes *b2,
11 | GError **error);
12 |
13 | gboolean file_has_prefix (const char *file,
14 | const char *str,
15 | GError **error);
16 |
17 | void print_attribute (PangoAttribute *attr,
18 | GString *string);
19 |
20 | void print_attributes (GSList *attrs,
21 | GString *string);
22 |
23 | void print_attr_list (PangoAttrList *attrs,
24 | GString *string);
25 |
26 | const char *get_script_name (GUnicodeScript s);
27 |
28 | PangoFontMap *get_font_map_with_cantarell (void);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/tests/itemize/two.expected:
--------------------------------------------------------------------------------
1 | one two two three
2 |
3 | Items: one two two th |r |ee
4 | Chars: 14(0) |1(14) |2(15)
5 | Font: Cantarell 11 |Cantarell Bold 11|Cantarell 11
6 | Script: latin |latin |latin
7 | Lang: en-us |en-us |en-us
8 | Bidi: 0 |0 |0
9 | Attrs: 8 11 font-features "dlig=1",6 7 underline single,4 12 font-features "tnum=0"| |
10 |
--------------------------------------------------------------------------------
/tests/breaks/eight.expected:
--------------------------------------------------------------------------------
1 | Text: 2 0 0 [ ] 2 4 . 1 0 [ ] 9 9 % [ ] a l p h a 1 0 b e t a [ ] 1 0 0 - 1 0 [ ] g r e e k - r o m a n [0x0a]
2 | Breaks: c c c c lc c c c c c lc c c c lc c c c c c c c c c c c lc c c c c c c lc c c c c c lc c c c c c Lc
3 | Whitespace: x x x x x w w
4 | Sentences: bs e b
5 | Words: bs be bs e s be bs be b bs be bs be bs be bs be bs be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/utils/test-nko.txt:
--------------------------------------------------------------------------------
1 | ߝߘߊ߬ߝߌ߲߬ߠߊ߫ ߟߊ߬ߘߏ߲߬ߞߏ߬ߦߊ߬ߟߌ ߜߙߋ߬ߡߊ߬ߕߍ߰ߟߌ
2 | ߞߖ߭ߊߓߎߟߊ߲ߞߊ ߓߍ߲߬ߡߊ߬ߞߊ߲ ߠߎ߬ :
3 |
4 | ߝߘߊ߬ߝߌ߲߬ߠߊ߫ ߘߎ߰ߙߋ߲ ߠߎ߬ ߟߊ߫ ߢߐ߲߯ߓߍ߲ ߟߊ߬ߘߏ߲߬ߞߏ߬ߦߊ߬ߟߌ ߞߊߡߊ߬ ߞߖ߭ߊߓߎߟߊߟߊ߲ߞߊ߫߸ ( ߞߊ߬ߓߌߛߊ߬ ) ߣߌ߫ ( ߓߌ߬ߛ߭ߊ߯ߙߊ ) ߘߍ߬ߘߊ ߟߎ߬ ߟߊ߫ ߓߊ߯ߙߊ߫
5 | ߘߊߞߎ߲ ߡߌ߬ߘߊ߬ ߞߣߍ ߞߊ߲߬߸ (IDRC = ߞߣߊߘߊ߫ ߝߘߏ߬ߓߊ߬ ߡߣߊ߬ߙߏ߲߬ߠߌ߲ ߝߊ߲ߓߊ ߞ.ߝ.ߡ.ߝ.) ߞߊ߬ ߡߍ߲ ߖߐ߰ߣߍ ߓߐ߫ ߸ (MTDS =
6 | ߡߊ߬ߙߐߞߎ߫ ߖߊ߬ߥߏ ߟߊ߬ߥߙߎ߬ߞߌ߬ߟߌ ߗߋߢߊߟߌ ߡ.ߖ.ߥߗ.) ߝߊ߬ߙߊ ߘߐ߫ ߊ߬ ߞߊ߲߬ ( ߞߖ߭ߊߓߎߟߊ߲ߞߊ߫ ߕߎߞߑߣߏߔߊߞ ) ߘߍ߬ߞߙߎ ߝߊ߲ߓߊ ߝߍ߬.
7 |
8 | ߞߎ߲߬ߜߙߊ ߣߌ߲߬ ߞߊ߬ ߕߣߐ߬ߓߊ߫ ߛߐ߬ߘߐ߲߬ ߡߊߙߐߞߎ߬ ߖߡߊ߬ߣߊ ߡߊ߬ߞߐ߬ߙߐ߲߬ߞߐ߬ߙߐ߲߬ߠߌ ߞߏߕߌ߮ ߣߴߊ߬ ߣߐ߬ߝߍ߬ ߖߡߊ ߟߊ߫ ߸ ߏ߬ ߟߎ߬ ߡߍ߲ ߠߎ߫ ߣߊ߬ ߘߊ߫
9 | ߞߏߕߌ߯ ߟߎ߬ ߞߊ߲ߕߌ߮ ߞߐߦߌ߬ߘߊ߬، ߞߊ߬ ߕߐ߬ߣߐ߫ ߛߐ߬ߘߐ߲߬ ߞߣߊߘߊ߫ ߟߊ߬ߛߌ߰ߘߋ߲ ߝߣߊ߫ ߟߊ߫ ߣߊ߬ߟߌ ߣߌ߫ ߜߙߋ߫ ߜߘߍ ߘߎ߰ߙߋ߲߫ ߣߊ߬ߓߊ߮ ߟߎ߬ ߟߊ߫.
10 |
11 | ߕߋ߬ߟߋ߫ ߛߓߊ߬ ߖߊ߬ߣߍ߲߬ ߓߊ߯ߙߊ ߘߝߊߣߍ߲ ߞߐ߫ ߸ ߞߎ߲߬ߜߙߊ ߕߘߍ߬ߒ߬ߘߐ߬ߓߊ߰ߕߐ ߟߎ߫ ߓߍ߲߬ ߘߊ߫ ߞߊ߲߫ ߣߊ߬ߕߐ ߢߌ߲߬ ߠߎ߫ ߡߊ߬ :
12 |
13 | • ߕߟߋ߬ߓߊ߮ ߛߋߒߞߏߟߦߊ ߣߌ߫ ߟߐ߲ߕߊ ( ߕ.ߛ.ߟ. ICT ) ߘߊ߲߬ߠߊߕߍ߭ ߥߊߟߌ߫ ߞߊ߲߫ ߞߋߟߋ߲߫ ߡߊ߬ ߕߋ߲߬ ߸ ߏ߬ ߦߋ߫ ߡߌ߬ߙߌ߲߬ߘߌ ߟߎ߬ ߢߐ߲߯
14 | ߕߍ߫ ߞߣߍ ߝߏ߬ߣߊ߲ ߥߙߊ߬ ߟߊ߫ ߟߋ߬، ߞߊ߬ ߕߟߋ߬ߓߊ߮ ߟߐ߲ߠߌ߲ ߓߊߓߋ߭ ߥߎ߬ߛߎ ߖߊ߲߬ߧߊ߫ ߸ ߞߵߊ߬ ߞߊ߬ߙߊ߲ ߣߴߊ߬ ߘߊ ߜߟߍ߬ߦߊ߫، ߞߊ߬ߕߎ߯ ߸ ߊ߬
15 | ߘߌ߫ ߦߙߐ ߟߐ߲ߠߌ߲ߧߊ ߝߣߊ߫ ߖߐ߲ߝߐ߲߫ ߞߏߛߓߍ߫.
--------------------------------------------------------------------------------
/pango/pango-enum-types.c.template:
--------------------------------------------------------------------------------
1 | /*** BEGIN file-header ***/
2 | #include "config.h"
3 |
4 | #include
5 |
6 | /*** END file-header ***/
7 |
8 | /*** BEGIN file-production ***/
9 | /* enumerations from "@basename@" */
10 | /*** END file-production ***/
11 |
12 | /*** BEGIN value-header ***/
13 | GType
14 | @enum_name@_get_type (void)
15 | {
16 | static gsize g_define_type_id__volatile = 0;
17 |
18 | if (g_once_init_enter (&g_define_type_id__volatile))
19 | {
20 | static const G@Type@Value values[] = {
21 | /*** END value-header ***/
22 |
23 | /*** BEGIN value-production ***/
24 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
25 | /*** END value-production ***/
26 |
27 | /*** BEGIN value-tail ***/
28 | { 0, NULL, NULL }
29 | };
30 | GType g_define_type_id =
31 | g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
32 | g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
33 | }
34 |
35 | return g_define_type_id__volatile;
36 | }
37 |
38 | /*** END value-tail ***/
39 |
--------------------------------------------------------------------------------
/tests/gen-all-unicode.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | import sys
4 |
5 | # From glib/gutf8.c:
6 | #
7 | #define UNICODE_VALID(Char) \
8 | # ((Char) < 0x110000 && (((Char) & 0xFFFFF800) != 0xD800))
9 |
10 | def is_valid_unicode(ch):
11 | if ch < 0x110000 and (ch & 0xFFFFF800) != 0xD800:
12 | return True
13 |
14 | return False
15 |
16 | if __name__ == '__main__':
17 | if len(sys.argv) < 2:
18 | sys.exit('Usage: gen-all-unicode.py OUTFILE')
19 |
20 | with open(sys.argv[1], 'wb') as f:
21 | for j in range(0, 2):
22 | for i in range(0, 65536):
23 | if is_valid_unicode(i):
24 | f.write(chr(i).encode('utf-8', 'surrogatepass'))
25 |
26 | if j == 1:
27 | f.write(b' ')
28 |
29 | if j == 0:
30 | if i % 40 == 0 and i != 0:
31 | f.write(b'\n')
32 | else:
33 | if i % 20 == 0 and i != 0:
34 | f.write(b'\n')
35 |
36 | f.write(b'\n')
37 |
--------------------------------------------------------------------------------
/docs/pango-segmentation.rst:
--------------------------------------------------------------------------------
1 | .. _pango-segmentation(1):
2 |
3 | ==================
4 | pango-segmentation
5 | ==================
6 |
7 | -----------------------
8 | Pango text segmentation
9 | -----------------------
10 |
11 | :Version: Pango
12 | :Manual section: 1
13 | :Manual group: Pango commands
14 |
15 | SYNOPSIS
16 | --------
17 |
18 | | **pango-segmentation** [OPTIONS...] [FILE]
19 |
20 | DESCRIPTION
21 | -----------
22 |
23 | ``pango-segmentation`` shows text boundaries determined by Pango.
24 |
25 | These can be graphemes (cursor positions), words boundaries, word
26 | starts and ends, line break possibilities, sentence boundaries, or
27 | sentence starts and ends.
28 |
29 | HELP OPTIONS
30 | ------------
31 |
32 | ``-h, --help``
33 |
34 | Show help options.
35 |
36 | ``--version``
37 |
38 | Print the command's version and exit.
39 |
40 | APPLICATION OPTIONS
41 | -------------------
42 |
43 | ``--text=STRING``
44 |
45 | Text to display (instead of ``FILE``).
46 |
47 | ``--kind=KIND``
48 |
49 | The boundary to show. ``KIND`` can be one of grapheme, word, words, line, sentence,
50 | sentences. (default: grapheme).
51 |
--------------------------------------------------------------------------------
/pango/pango.rc.in:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | VS_VERSION_INFO VERSIONINFO
4 | FILEVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
5 | PRODUCTVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
6 | FILEFLAGSMASK 0
7 | FILEFLAGS 0
8 | FILEOS VOS__WINDOWS32
9 | FILETYPE VFT_DLL
10 | FILESUBTYPE VFT2_UNKNOWN
11 | BEGIN
12 | BLOCK "StringFileInfo"
13 | BEGIN
14 | BLOCK "040904B0"
15 | BEGIN
16 | VALUE "CompanyName", "Red Hat Software"
17 | VALUE "FileDescription", "Pango"
18 | VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
19 | VALUE "InternalName", "pango-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
20 | VALUE "LegalCopyright", "Copyright 1999 Red Hat Software."
21 | VALUE "OriginalFilename", "pango-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
22 | VALUE "ProductName", "Pango"
23 | VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
24 | END
25 | END
26 | BLOCK "VarFileInfo"
27 | BEGIN
28 | VALUE "Translation", 0x409, 1200
29 | END
30 | END
31 |
--------------------------------------------------------------------------------
/docs/pangoft2.toml.in:
--------------------------------------------------------------------------------
1 | [library]
2 | namespace = "PangoFT2"
3 | version = "@PANGO_VERSION@"
4 | browse_url = "https://gitlab.gnome.org/GNOME/pango/"
5 | repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
6 | docs_url = "https://docs.gtk.org/PangoFT2"
7 | website_url = "https://www.pango.org"
8 | authors = "Owen Taylor, Behdad Esfahbod"
9 | logo_url = "pango-name.png"
10 | license = "LGPL-2.1-or-later"
11 | description = "FreeType support for Pango"
12 | dependencies = [ "Pango-1.0", "freetype2-2.0" ]
13 | devhelp = true
14 | search_index = true
15 |
16 | [dependencies."Pango-1.0"]
17 | name = "Pango"
18 | description = "A library for layout out and rendering of text"
19 | docs_url = "../Pango/"
20 |
21 | [dependencies."freetype2-2.0"]
22 | name = "freetype2"
23 | description = "A font loading and rendering library"
24 | docs_url = "https://www.freetype.org"
25 |
26 | [theme]
27 | name = "basic"
28 | show_index_summary = true
29 |
30 | [source-location]
31 | base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/main/"
32 |
33 | [extra]
34 |
35 | content_images = [
36 | "pango-name.png"
37 | ]
38 |
39 | urlmap_file = "urlmap.js"
40 |
41 |
--------------------------------------------------------------------------------
/pango/pangocairo.rc.in:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | VS_VERSION_INFO VERSIONINFO
4 | FILEVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
5 | PRODUCTVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
6 | FILEFLAGSMASK 0
7 | FILEFLAGS 0
8 | FILEOS VOS__WINDOWS32
9 | FILETYPE VFT_DLL
10 | FILESUBTYPE VFT2_UNKNOWN
11 | BEGIN
12 | BLOCK "StringFileInfo"
13 | BEGIN
14 | BLOCK "040904B0"
15 | BEGIN
16 | VALUE "CompanyName", "Red Hat Software"
17 | VALUE "FileDescription", "PangoCairo"
18 | VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
19 | VALUE "InternalName", "pangocairo-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
20 | VALUE "LegalCopyright", "Copyright 2010 Red Hat Software."
21 | VALUE "OriginalFilename", "pangocairo-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
22 | VALUE "ProductName", "PangoCairo"
23 | VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
24 | END
25 | END
26 | BLOCK "VarFileInfo"
27 | BEGIN
28 | VALUE "Translation", 0x409, 1200
29 | END
30 | END
31 |
--------------------------------------------------------------------------------
/docs/pangofc.toml.in:
--------------------------------------------------------------------------------
1 | [library]
2 | namespace = "PangoFc"
3 | version = "@PANGO_VERSION@"
4 | browse_url = "https://gitlab.gnome.org/GNOME/pango/"
5 | repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
6 | docs_url = "https://docs.gtk.org/PangoFc"
7 | website_url = "https://www.pango.org"
8 | authors = "Owen Taylor, Behdad Esfahbod"
9 | logo_url = "pango-name.png"
10 | license = "LGPL-2.1-or-later"
11 | description = "Fontconfig support for Pango"
12 | dependencies = [ "Pango-1.0", "fontconfig-2.0" ]
13 | devhelp = true
14 | search_index = true
15 |
16 | [dependencies."Pango-1.0"]
17 | name = "Pango"
18 | description = "A library for layout out and rendering of text"
19 | docs_url = "../Pango/"
20 |
21 | [dependencies."fontconfig-2.0"]
22 | name = "fontconfig"
23 | description = "A font configuration and enumeration library"
24 | docs_url = "https://www.fontconfig.org"
25 |
26 | [theme]
27 | name = "basic"
28 | show_index_summary = true
29 |
30 | [source-location]
31 | base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/main/"
32 |
33 | [extra]
34 |
35 | content_images = [
36 | "pango-name.png"
37 | ]
38 |
39 | urlmap_file = "urlmap.js"
40 |
41 |
--------------------------------------------------------------------------------
/docs/pangoxft.toml.in:
--------------------------------------------------------------------------------
1 | [library]
2 | namespace = "PangoXft"
3 | version = "@PANGO_VERSION@"
4 | browse_url = "https://gitlab.gnome.org/GNOME/pango/"
5 | repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
6 | docs_url = "https://docs.gtk.org/PangoXft"
7 | website_url = "https://www.pango.org"
8 | authors = "Owen Taylor, Behdad Esfahbod"
9 | logo_url = "pango-name.png"
10 | license = "LGPL-2.1-or-later"
11 | description = "Xft support for Pango"
12 | dependencies = [ "Pango-1.0", "xft-2.0" ]
13 | devhelp = true
14 | search_index = true
15 |
16 | [dependencies."Pango-1.0"]
17 | name = "Pango"
18 | description = "A library for layout out and rendering of text"
19 | docs_url = "../Pango/"
20 |
21 | [dependencies."xft-2.0"]
22 | name = "xft"
23 | description = "X11 client-side font rendering library"
24 | docs_url = "https://x.org"
25 |
26 | [theme]
27 | name = "basic"
28 | show_index_summary = true
29 |
30 | [source-location]
31 | base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/main/"
32 |
33 | [extra]
34 | content_files = [
35 | "pango_xft.md"
36 | ]
37 |
38 | content_images = [
39 | "pango-name.png"
40 | ]
41 |
42 | urlmap_file = "urlmap.js"
43 |
--------------------------------------------------------------------------------
/pango/pangoft2.rc.in:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | VS_VERSION_INFO VERSIONINFO
4 | FILEVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
5 | PRODUCTVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
6 | FILEFLAGSMASK 0
7 | FILEFLAGS 0
8 | FILEOS VOS__WINDOWS32
9 | FILETYPE VFT_DLL
10 | FILESUBTYPE VFT2_UNKNOWN
11 | BEGIN
12 | BLOCK "StringFileInfo"
13 | BEGIN
14 | BLOCK "040904B0"
15 | BEGIN
16 | VALUE "CompanyName", "Red Hat Software"
17 | VALUE "FileDescription", "PangoFT2"
18 | VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
19 | VALUE "InternalName", "pangoft2-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
20 | VALUE "LegalCopyright", "Copyright 1999 Red Hat Software. Copyright 2000 Tor Lillqvist"
21 | VALUE "OriginalFilename", "pangoft2-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
22 | VALUE "ProductName", "PangoFT2"
23 | VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
24 | END
25 | END
26 | BLOCK "VarFileInfo"
27 | BEGIN
28 | VALUE "Translation", 0x409, 1200
29 | END
30 | END
31 |
--------------------------------------------------------------------------------
/pango/pangowin32.rc.in:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | VS_VERSION_INFO VERSIONINFO
4 | FILEVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
5 | PRODUCTVERSION @PANGO_VERSION_MAJOR@,@PANGO_VERSION_MINOR@,@PANGO_VERSION_MICRO@,0
6 | FILEFLAGSMASK 0
7 | FILEFLAGS 0
8 | FILEOS VOS__WINDOWS32
9 | FILETYPE VFT_DLL
10 | FILESUBTYPE VFT2_UNKNOWN
11 | BEGIN
12 | BLOCK "StringFileInfo"
13 | BEGIN
14 | BLOCK "040904B0"
15 | BEGIN
16 | VALUE "CompanyName", "Red Hat Software"
17 | VALUE "FileDescription", "PangoWin32"
18 | VALUE "FileVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@.0"
19 | VALUE "InternalName", "pangowin32-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@"
20 | VALUE "LegalCopyright", "Copyright 1999 Red Hat Software. Copyright 2000 Tor Lillqvist"
21 | VALUE "OriginalFilename", "pangowin32-@PANGO_API_VERSION@-@PANGO_CURRENT_MINUS_AGE@.dll"
22 | VALUE "ProductName", "PangoWin32"
23 | VALUE "ProductVersion", "@PANGO_VERSION_MAJOR@.@PANGO_VERSION_MINOR@.@PANGO_VERSION_MICRO@"
24 | END
25 | END
26 | BLOCK "VarFileInfo"
27 | BEGIN
28 | VALUE "Translation", 0x409, 1200
29 | END
30 | END
31 |
--------------------------------------------------------------------------------
/docs/pangocairo.toml.in:
--------------------------------------------------------------------------------
1 | [library]
2 | namespace = "PangoCairo"
3 | version = "@PANGO_VERSION@"
4 | browse_url = "https://gitlab.gnome.org/GNOME/pango/"
5 | repository_url = "https://gitlab.gnome.org/GNOME/pango.git"
6 | docs_url = "https://docs.gtk.org/PangoCairo"
7 | website_url = "https://www.pango.org"
8 | authors = "Owen Taylor, Behdad Esfahbod"
9 | logo_url = "pango-name.png"
10 | license = "LGPL-2.1-or-later"
11 | description = "Cairo support for Pango"
12 | dependencies = [ "Pango-1.0", "cairo-1.0" ]
13 | devhelp = true
14 | search_index = true
15 |
16 | [dependencies."Pango-1.0"]
17 | name = "Pango"
18 | description = "A library for layout out and rendering of text"
19 | docs_url = "../Pango/"
20 |
21 | [dependencies."cairo-1.0"]
22 | name = "cairo"
23 | description = "A vector graphics library"
24 | docs_url = "https://www.cairographics.org/manual/"
25 |
26 | [theme]
27 | name = "basic"
28 | show_index_summary = true
29 |
30 | [source-location]
31 | base_url = "https://gitlab.gnome.org/GNOME/pango/-/blob/main/"
32 |
33 | [extra]
34 | content_files = [
35 | "pango_cairo.md",
36 | ]
37 |
38 | content_images = [
39 | "pango-name.png",
40 | "rotated-text.png"
41 | ]
42 |
43 | urlmap_file = "urlmap.js"
44 |
--------------------------------------------------------------------------------
/tools/gen-vertical-orientation-U-table.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 | #coding:utf-8
3 | import os
4 | import sys
5 |
6 | if len(sys.argv) != 2:
7 | print('usage;./' + os.path.basename(__file__) + ' VerticalOrientation.txt')
8 | sys.exit(1)
9 |
10 | #pick up all data from text
11 | data = []
12 | f = open(sys.argv[1], 'r')
13 | for line in f:
14 | line = line.split("#")[0].strip()
15 | if len(line) == 0:
16 | continue
17 |
18 | coderange, vo = line.split(";")
19 | vo = vo.strip()
20 |
21 | codes = coderange.split("..")
22 | if len(codes) == 1:
23 | st = int(codes[0], 16)
24 | ed = st
25 | else:
26 | st = int(codes[0], 16)
27 | ed = int(codes[1], 16)
28 |
29 | data.append([st, ed, vo])
30 | f.close()
31 |
32 |
33 | #compress all data, replace Tu to U and Tr to R.
34 | compressed = []
35 | t = []
36 | for d in data:
37 | if d[2] == 'Tu': d[2] = 'U'
38 | if d[2] == 'Tr': d[2] = 'R'
39 |
40 | if t == []:
41 | t = d
42 | else:
43 | if t[2] == d[2] and t[1] + 1 == d[0]:
44 | t[1] = d[1]
45 | else:
46 | compressed.append(t)
47 | t = d
48 | compressed.append(t)
49 |
50 |
51 | #dump vo=U
52 | for d in compressed:
53 | if d[2] == 'U':
54 | print('{0x%04X, 0x%04X},' % tuple(d[0:2]))
55 |
--------------------------------------------------------------------------------
/tests/markups/valid-4.expected:
--------------------------------------------------------------------------------
1 | bold big italic strikethroughsub smallsup tt underline
2 |
3 |
4 | ---
5 |
6 | range 0 5
7 | 0 15 weight bold
8 | range 5 8
9 | 0 15 weight bold
10 | 5 8 scale 1.200000
11 | range 8 9
12 | 0 15 weight bold
13 | range 9 15
14 | 0 15 weight bold
15 | 9 15 style italic
16 | range 15 16
17 | range 16 29
18 | 16 41 strikethrough true
19 | range 29 32
20 | 16 41 strikethrough true
21 | 29 32 font-scale subscript
22 | 29 32 baseline-shift subscript
23 | range 32 33
24 | 16 41 strikethrough true
25 | range 33 38
26 | 16 41 strikethrough true
27 | 33 38 scale 0.833333
28 | range 38 41
29 | 16 41 strikethrough true
30 | 38 41 font-scale superscript
31 | 38 41 baseline-shift superscript
32 | range 41 42
33 | range 42 45
34 | 42 54 family "Monospace"
35 | range 45 54
36 | 42 54 family "Monospace"
37 | 45 54 underline single
38 | range 54 2147483647
39 |
40 |
41 | ---
42 |
43 | [0:5] (null) Bold
44 | [5:8] (null) Bold 0
45 | [8:9] (null) Bold 0
46 | [9:15] (null) Bold Italic 0
47 | [15:16] (null) Bold Italic 0
48 | [16:29] (null) Bold Italic 0
49 | [29:32] (null) Bold Italic 0
50 | [32:33] (null) Bold Italic 0
51 | [33:38] (null) Bold Italic 0
52 | [38:41] (null) Bold Italic 0
53 | [41:42] (null) Bold Italic 0
54 | [42:45] (null) Monospace Bold Italic 0
55 | [45:54] (null) Monospace Bold Italic 0
56 | [54:2147483647] (null) Monospace Bold Italic 0
57 |
--------------------------------------------------------------------------------
/.gitlab-ci/fedora.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM fedora:42
2 |
3 | RUN dnf -y install \
4 | abattis-cantarell-fonts \
5 | cairo-devel \
6 | cairo-gobject-devel \
7 | ccache \
8 | clang \
9 | clang-analyzer \
10 | desktop-file-utils \
11 | diffutils \
12 | fontconfig-devel \
13 | fribidi-devel \
14 | gcc \
15 | gcc-c++ \
16 | gettext \
17 | git \
18 | glib2-devel \
19 | glib2-static \
20 | glibc-devel \
21 | glibc-headers \
22 | glibc-langpack-en \
23 | gobject-introspection-devel \
24 | google-droid-sans-fonts \
25 | gtk-doc \
26 | harfbuzz-devel \
27 | hicolor-icon-theme \
28 | itstool \
29 | json-glib-devel \
30 | libasan \
31 | lcov \
32 | libthai-devel \
33 | libubsan \
34 | libXft-devel \
35 | llvm \
36 | meson \
37 | ninja-build \
38 | python3 \
39 | python3-docutils \
40 | python3-jinja2 \
41 | python3-markdown \
42 | python3-packaging \
43 | python3-pip \
44 | python3-pygments \
45 | python3-toml \
46 | python3-typogrify \
47 | python3-wheel \
48 | redhat-rpm-config \
49 | thai-scalable-waree-fonts \
50 | && dnf clean all
51 |
52 | ARG HOST_USER_ID=5555
53 | ENV HOST_USER_ID ${HOST_USER_ID}
54 | RUN useradd -u $HOST_USER_ID -ms /bin/bash user
55 |
56 | USER user
57 | WORKDIR /home/user
58 |
59 | ENV LANG C.UTF-8
60 |
--------------------------------------------------------------------------------
/pango/pango-trace.c:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-trace.c:
3 | *
4 | * Copyright (C) 2020 Red Hat, Inc
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library. If not, see .
18 | */
19 |
20 | #include "config.h"
21 |
22 | #include "pango-trace-private.h"
23 |
24 | #include
25 |
26 | void
27 | (pango_trace_mark) (gint64 begin_time,
28 | const gchar *name,
29 | const gchar *message_format,
30 | ...)
31 | {
32 | #ifdef HAVE_SYSPROF
33 | gint64 end_time = PANGO_TRACE_CURRENT_TIME;
34 | va_list args;
35 |
36 | va_start (args, message_format);
37 | sysprof_collector_mark_vprintf (begin_time, end_time - begin_time, "Pango", name, message_format, args);
38 | va_end (args);
39 | #endif /* HAVE_SYSPROF */
40 | }
41 |
--------------------------------------------------------------------------------
/pango/pango-fontset-simple-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-fontset-simple-private.h: Font handling
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_FONTSET_SIMPLE_PRIVATE_H__
23 | #define __PANGO_FONTSET_SIMPLE_PRIVATE_H__
24 |
25 | #include
26 |
27 | G_BEGIN_DECLS
28 |
29 | struct _PangoFontsetSimple
30 | {
31 | PangoFontset parent_instance;
32 |
33 | GPtrArray *fonts;
34 | PangoLanguage *language;
35 | };
36 |
37 | struct _PangoFontsetSimpleClass
38 | {
39 | PangoFontsetClass parent_class;
40 | };
41 |
42 | G_END_DECLS
43 |
44 | #endif /* __PANGO_FONTSET_SIMPLE_PRIVATE_H__ */
45 |
--------------------------------------------------------------------------------
/utils/test-hebrew.txt:
--------------------------------------------------------------------------------
1 | בְּרֵאשִׁ֖ית בָּרָ֣א אֱלֹהִ֑ים אֵ֥ת הַשָּׁמַ֖יִם וְאֵ֥ת הָאָֽרֶץ׃
2 | וְהָאָ֗רֶץ הָֽיְתָ֥ה תֹ֨הוּ֙ וָבֹ֔הוּ וְחֹ֖שֶׁךְ עַל־פְּנֵ֣י תְה֑וֹם וְר֣וּחַ אֱלֹהִ֔ים מְרַחֶ֖פֶת עַל־פְּנֵ֥י הַמָּֽיִם׃
3 | וַיֹּ֥אמֶר אֱלֹהִ֖ים יְהִ֣י א֑וֹר וַֽיְהִי־אֽוֹר׃
4 | וַיַּ֧רְא אֱלֹהִ֛ים אֶת־הָא֖וֹר כִּי־ט֑וֹב וַיַּבְדֵּ֣ל אֱלֹהִ֔ים בֵּ֥ין הָא֖וֹר וּבֵ֥ין הַחֹֽשֶׁךְ׃
5 | וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לָאוֹר֙ י֔וֹם וְלַחֹ֖שֶׁךְ קָ֣רָא לָ֑יְלָה וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם אֶחָֽד׃
6 | וַיֹּ֣אמֶר אֱלֹהִ֔ים יְהִ֥י רָקִ֖יעַ בְּת֣וֹךְ הַמָּ֑יִם וִיהִ֣י מַבְדִּ֔יל בֵּ֥ין מַ֖יִם לָמָֽיִם׃
7 | וַיַּ֣עַשׂ אֱלֹהִים֮ אֶת־הָֽרָקִיעַ֒ וַיַּבְדֵּ֗ל בֵּ֤ין הַמַּ֨יִם֙ אֲשֶׁר֙ מִתַּ֣חַת לָֽרָקִ֔יעַ וּבֵ֣ין הַמַּ֔יִם אֲשֶׁ֖ר מֵעַ֣ל לָֽרָקִ֑יעַ וַֽיְהִי־כֵֽן׃
8 | וַיִּקְרָ֧א אֱלֹהִ֛ים לָֽרָקִ֖יעַ שָׁמָ֑יִם וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם שֵׁנִֽי׃
9 | וַיֹּ֣אמֶר אֱלֹהִ֗ים יִקָּו֨וּ הַמַּ֜יִם מִתַּ֤חַת הַשָּׁמַ֨יִם֙ אֶל־מָק֣וֹם אֶחָ֔ד וְתֵֽרָאֶ֖ה הַיַּבָּשָׁ֑ה וַֽיְהִי־כֵֽן׃
10 | וַיִּקְרָ֨א אֱלֹהִ֤ים ׀ לַיַּבָּשָׁה֙ אֶ֔רֶץ וּלְמִקְוֵ֥ה הַמַּ֖יִם קָרָ֣א יַמִּ֑ים וַיַּ֥רְא אֱלֹהִ֖ים כִּי־טֽוֹב׃
11 | וַיֹּ֣אמֶר אֱלֹהִ֗ים תַּֽדְשֵׁ֤א הָאָ֨רֶץ֙ דֶּ֗שֶׁא עֵ֚שֶׂב מַזְרִ֣יעַ זֶ֔רַע עֵ֣ץ פְּרִ֞י עֹ֤שֶׂה פְּרִי֙ לְמִינ֔וֹ אֲשֶׁ֥ר זַרְעוֹ־ב֖וֹ עַל־הָאָ֑רֶץ וַֽיְהִי־כֵֽן׃
12 | וַתּוֹצֵ֨א הָאָ֜רֶץ דֶּ֠שֶׁא עֵ֣שֶׂב מַזְרִ֤יעַ זֶ֨רַע֙ לְמִינֵ֔הוּ וְעֵ֧ץ עֹֽשֶׂה־פְּרִ֛י אֲשֶׁ֥ר זַרְעוֹ־ב֖וֹ לְמִינֵ֑הוּ וַיַּ֥רְא אֱלֹהִ֖ים כִּי־טֽוֹב׃
13 | וַֽיְהִי־עֶ֥רֶב וַֽיְהִי־בֹ֖קֶר י֥וֹם שְׁלִישִֽׁי׃
14 |
--------------------------------------------------------------------------------
/tests/markups/valid-11.expected:
--------------------------------------------------------------------------------
1 | Lots of attrs
2 |
3 |
4 | ---
5 |
6 | range 0 5
7 | 0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
8 | 0 13 foreground #0000ffff0000
9 | 0 13 background #f0f0f0f0f0f0
10 | 0 13 underline double
11 | 0 13 underline-color #ffff00000000
12 | 0 13 gravity south
13 | 0 13 gravity-hint strong
14 | 0 13 strikethrough true
15 | 0 13 strikethrough-color #00000000ffff
16 | 0 13 fallback false
17 | 0 13 language de
18 | range 5 7
19 | 0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
20 | 0 13 foreground #0000ffff0000
21 | 0 13 background #f0f0f0f0f0f0
22 | 0 13 underline double
23 | 0 13 underline-color #ffff00000000
24 | 0 13 gravity south
25 | 0 13 gravity-hint strong
26 | 0 13 strikethrough true
27 | 0 13 strikethrough-color #00000000ffff
28 | 0 13 fallback false
29 | 0 13 language de
30 | 5 7 font-desc "Bold"
31 | range 7 13
32 | 0 13 font-desc "Sans Italic 12 @wdth=100,wght=200"
33 | 0 13 foreground #0000ffff0000
34 | 0 13 background #f0f0f0f0f0f0
35 | 0 13 underline double
36 | 0 13 underline-color #ffff00000000
37 | 0 13 gravity south
38 | 0 13 gravity-hint strong
39 | 0 13 strikethrough true
40 | 0 13 strikethrough-color #00000000ffff
41 | 0 13 fallback false
42 | 0 13 language de
43 | range 13 2147483647
44 |
45 |
46 | ---
47 |
48 | [0:5] de Sans Italic 12 @wdth=100,wght=200
49 | [5:7] de Sans Bold 12 @wdth=100,wght=200
50 | [7:13] de Sans Italic 12 @wdth=100,wght=200
51 | [13:2147483647] (null) Sans Italic 12 @wdth=100,wght=200
52 |
--------------------------------------------------------------------------------
/pango/pangocairo-fc-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocairo-fc.h: Private header file for Cairo/fontconfig combination
3 | *
4 | * Copyright (C) 2005 Red Hat, Inc.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGOCAIRO_FC_PRIVATE_H__
23 | #define __PANGOCAIRO_FC_PRIVATE_H__
24 |
25 | #include
26 | #include
27 |
28 | G_BEGIN_DECLS
29 |
30 | struct _PangoCairoFcFontMap
31 | {
32 | PangoFcFontMap parent_instance;
33 |
34 | guint serial;
35 | double dpi;
36 | };
37 |
38 |
39 | PangoFcFont *_pango_cairo_fc_font_new (PangoCairoFcFontMap *cffontmap,
40 | PangoFcFontKey *key);
41 |
42 | G_END_DECLS
43 |
44 | #endif /* __PANGOCAIRO_FC_PRIVATE_H__ */
45 |
46 |
--------------------------------------------------------------------------------
/utils/test-mongolian.txt:
--------------------------------------------------------------------------------
1 | ᠡᠷᠲᠡ ᠤᠷᠢᠳᠠ ᠺᠠᠪᠠᠯᠢᠺ ᠪᠠᠯᠭᠠᠰᠤᠨ ᠳᠤᠷ ᠪᠢᠷᠠᠮᠠᠨ ᠤ ᠬᠠᠮᠤᠭ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠳᠦᠷ ᠮᠡᠷᠭᠡᠨ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠰᠠᠢᠨ ᠲᠥᠷᠥᠯ ᠲᠦ ᠬᠡᠮᠡᠬᠦ
2 | ᠨᠢᠭᠡᠨ ᠪᠢᠷᠠᠮᠠᠨ ᠪᠦᠯᠦᠭᠡ᠃ ᠲᠡᠷᠡ ᠪᠢᠷᠠᠮᠠᠨ ᠳᠤᠷ ᠰᠡᠳᠬᠢᠯ ᠳᠤᠷ ᠲᠠᠭᠠᠯᠠᠬᠤ ᠨᠡᠷᠡᠲᠦ ᠨᠢᠭᠡᠨ ᠬᠠᠲᠤᠭᠲᠠᠢ ᠪᠦᠯᠦᠭᠡ᠃ ᠲᠡᠷᠡ ᠬᠣᠶᠠᠷ
3 | ᠠᠴᠠ ᠨᠢᠭᠡᠨ ᠬᠥᠪᠡᠭᠦᠨ ᠲᠥᠷᠥᠵᠦᠬᠦᠢ᠃ ᠲᠡᠷᠡ ᠬᠥᠪᠡᠭᠦᠨ ᠢᠨᠤ ᠦᠴᠦᠭᠦᠬᠡᠨ ᠡᠴᠡ ᠭᠡᠭᠡᠨ ᠣᠶᠤᠲᠤ ᠶᠡᠬᠡᠰ ᠦᠨ ᠶᠠᠪᠤᠳᠠᠯ ᠢᠶᠠᠷ ᠶᠠᠪᠤᠭᠴᠢ
4 | ᠨᠢᠭᠡᠨ ᠪᠣᠯᠪᠠᠢ᠃ ᠲᠡᠨᠳᠡ ᠡᠬᠡ ᠢᠨᠤ ᠠᠶᠠ ᠡᠨᠡ ᠬᠥᠪᠡᠭᠦᠨ ᠲᠥᠷᠥᠭᠡᠳ ᠰᠠᠴᠠ ᠶᠡᠬᠡᠰ ᠦᠨ ᠶᠠᠪᠤᠳᠠᠯ ᠢᠶᠠᠷ ᠶᠠᠪᠤᠭᠴᠢ ᠭᠡᠭᠡᠨ ᠣᠶᠤᠲᠤ
5 | ᠪᠦᠬᠦ ᠶᠢᠨ ᠲᠤᠯᠠ᠃ ᠮᠠᠭᠠᠳ ᠨᠢᠭᠡᠨ ᠵᠠᠶᠠᠭ᠋ᠠ ᠲᠤ ᠪᠤᠢ ᠵᠠ ᠬᠡᠮᠡᠵᠦ᠃ ᠭᠡᠢᠭᠰᠡᠨ ᠬᠡᠮᠡᠨ ᠨᠡᠷᠡ ᠥᠭᠭᠦᠭᠡᠳ᠃ ᠠᠢ ᠡᠨᠡ ᠬᠥᠪᠡᠭᠦᠨ
6 | ᠳ᠋ᠦᠷ ᠬᠠᠮᠤᠭ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠢ ᠰᠤᠷᠭᠠᠰᠤᠭᠠᠢ ᠬᠡᠮᠡᠵᠦ ᠪᠦᠷᠦᠨ᠃ ᠡᠴᠢᠭᠡ ᠡᠬᠡ ᠬᠣᠶᠠᠷ ᠪᠡᠷ ᠰᠤᠷᠭᠠᠭᠰᠠᠨ ᠳᠤᠷ᠃ ᠳᠥᠷᠪᠡᠯ
7 | ᠦᠭᠡᠢ ᠮᠡᠳᠡᠬᠦᠢ ᠨᠢᠭᠡᠨ ᠪᠣᠯᠪᠠᠢ᠃ ᠲᠡᠷᠡ ᠬᠥᠪᠡᠭᠦᠨ ᠢᠨᠤ ᠳᠣᠯᠣᠭᠠᠨ ᠵᠢᠯ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠳᠤᠷ᠃ ᠪᠢᠷᠠᠮᠠᠨ ᠤ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠳᠦᠷ
8 | ᠮᠡᠷᠭᠡᠨ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠡᠷᠳᠡᠮ ᠦᠳ ᠢᠨᠤ ᠬᠠᠮᠤᠭ ᠪᠦᠭᠦᠳᠡᠭᠡᠷ ᠲᠦᠷ ᠰᠣᠨᠣᠰᠲᠠᠭᠰᠠᠨ᠋ᠠ᠃ ᠲᠡᠷᠡ ᠴᠠᠭ ᠲᠤᠷ ᠺᠠᠪᠠᠯᠢᠺ ᠪᠠᠯᠭᠠᠰᠤᠨ ᠳᠠᠬᠢᠨ ᠤᠬᠠᠭᠠᠨ ᠤ
9 | ᠵᠦᠢᠯ ᠳᠦᠷ ᠮᠡᠷᠭᠡᠨ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠬᠠᠮᠤᠭ ᠪᠢᠷᠠᠮᠠᠨ ᠴᠢᠭᠤᠯᠵᠤ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠳᠦᠷ ᠲᠡᠮᠡᠴᠡᠭᠰᠡᠨ ᠳᠦᠷ᠃ ᠪᠢᠷᠠᠮᠠᠨ ᠤ ᠭᠡᠢᠭᠰᠡᠨ ᠬᠥᠪᠡᠭᠦᠨ
10 | ᠮᠠᠱᠢ ᠶᠡᠬᠡ ᠦᠯᠡᠮᠵᠢ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠳᠤᠷ᠃ ᠲᠡᠳᠡᠭᠡᠷ ᠪᠢᠷᠠᠮᠠᠨ ᠥᠭᠦᠯᠡᠷ ᠦᠨ᠃ ᠠᠢ ᠬᠥᠪᠡᠭᠦᠨ ᠠ᠋ ᠨᠠᠰᠤᠨ ᠴᠢᠨᠤ ᠡᠢᠮᠦ ᠵᠠᠯᠠᠭᠤ
11 | ᠪᠥᠭᠡᠲᠡᠯᠡ᠃ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠳᠦᠷ ᠡᠨᠡ ᠮᠡᠲᠦ ᠮᠡᠷᠭᠡᠨ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠬᠡᠷ ᠪᠤᠶᠤ ᠬᠡᠮᠡᠨ ᠠᠰᠠᠭᠪᠠᠰᠤ᠃ ᠬᠥᠪᠡᠭᠦᠨ ᠥᠭᠦᠯᠡᠷ ᠦᠨ᠃
12 | ᠲᠣᠭᠣᠯᠤᠭᠰᠠᠨ ᠪᠤᠷᠬᠠᠨ ᠪᠡᠷ ᠪᠠᠭᠱᠢ ᠮᠢᠨᠤ ᠪᠤᠢ᠃ ᠪᠣᠭᠳᠠᠰ ᠤᠨ ᠨᠣᠮ ᠪᠡᠷ ᠢᠪᠡᠭᠡᠭᠴᠢ ᠮᠢᠨᠤ ᠪᠤᠢ᠃ ᠪᠤᠷᠰᠠᠩ ᠬᠤᠸᠠᠷᠠᠭ ᠤᠳ ᠪᠡᠷ
13 | ᠤᠳᠤᠷᠢᠳᠳᠤᠭᠴᠢ ᠮᠢᠨᠤ ᠪᠤᠢ᠃ ᠭᠤᠷᠪᠠᠨ ᠡᠷᠳᠡᠨᠢᠰ ᠦᠨ ᠠᠳᠢᠰᠲᠢᠳ ᠬᠢᠭᠰᠡᠨ ᠦ ᠬᠦᠴᠦ ᠪᠡᠷ ᠦᠢᠯᠡ ᠦᠷᠡᠰ ᠲᠦᠷ ᠦᠨᠡᠮᠱᠢᠭᠰᠡᠨ ᠦ ᠲᠤᠯᠠ᠃
14 | ᠰᠡᠱᠢᠭ ᠦᠭᠡᠢ ᠡᠷᠲᠡ ᠱᠢᠯᠲᠠᠭᠠᠨ ᠤ ᠬᠥᠷᠥᠩᠭᠡ ᠰᠠᠴᠤᠭᠰᠠᠨ ᠳᠤᠷ᠃ ᠦᠷᠡ ᠦᠯᠦ ᠬᠣᠮᠰᠠᠳᠬᠤ ᠪᠤᠶᠠᠨ ᠢ ᠬᠢᠴᠢᠶᠡᠭᠰᠡᠨ ᠪᠤᠢ᠃ ᠨᠠᠰᠤᠨ
15 | ᠮᠢᠨᠤ ᠵᠠᠯᠠᠭᠤ ᠪᠣᠯᠪᠠᠰᠤ᠃ ᠤᠬᠠᠭᠠᠨ ᠤ ᠵᠦᠢᠯ ᠳᠦᠷ ᠮᠡᠷᠭᠡᠨ ᠪᠣᠯᠤᠭᠰᠠᠨ ᠤ ᠤᠴᠢᠷ ᠲᠡᠢᠮᠦ ᠪᠤᠢ ᠅ ᠅
16 |
--------------------------------------------------------------------------------
/utils/HELLO.txt:
--------------------------------------------------------------------------------
1 | This is Pango (Παν語)
2 |
3 | This is a list of ways to say hello in various languages.
4 | Its purpose is to illustrate a number of scripts.
5 |
6 | ---------------------------------------------------------
7 | Arabic السَّلام عليكُم
8 | Bengali (বাঙ্লা) ষাগতোম
9 | Burmese မ္ရန္မာ
10 | Cherokee (ᏣᎳᎩ) ᎣᏏᏲ
11 | Czech (česky) Dobrý den
12 | Danish (Dansk) Hej, Goddag
13 | English Hello
14 | Esperanto Saluton
15 | Estonian Tere, Tervist
16 | FORTRAN PROGRAM
17 | Finnish (Suomi) Hei
18 | French (Français) Bonjour, Salut
19 | German (Deutsch Nord) Guten Tag
20 | German (Deutsch Süd) Grüß Gott
21 | Georgian (ქართველი) გამარჯობა
22 | Gujarati ગુજરાતિ
23 | Greek (Ελληνικά) Γειά σας
24 | Hebrew שלום
25 | Hindi नमस्ते, नमस्कार।
26 | Italiano Ciao, Buon giorno
27 | IPA English (ɪŋglɪʃ) hɛləʊ
28 | Lao ສບາຍດ
29 | Maltese Ċaw, Saħħa
30 | Nederlands, Vlaams Hallo, Dag
31 | Norwegian (Norsk) Hei, God dag
32 | Punjabi ਪੁਂਜਾਬਿ
33 | Polish Dzień dobry, Hej
34 | Russian (Русский) Здравствуйте!
35 | Sinhala (සිංහල) ආයුබෝවන්
36 | Slovak Dobrý deň
37 | Spanish (Español) ¡Hola!
38 | Swedish (Svenska) Hej, Goddag
39 | Thai (ภาษาไทย) สวัสดีครับ, สวัสดีค่ะ
40 | Tamil (தமிழ்) வணக்கம்
41 | Turkish (Türkçe) Merhaba
42 | Vietnamese (Tiếng Việt) Xin Chào
43 | Yiddish (ײַדישע) דאָס הײַזעלע
44 |
45 | Japanese (日本語) こんにちは, コンニチハ
46 | Chinese (中文,普通话,汉语) 你好
47 | Cantonese (粵語,廣東話) 早晨, 你好
48 | Korean (한글) 안녕하세요, 안녕하십니까
49 |
50 | Difference among chinese characters in GB, JIS, KSC, BIG5:
51 | GB -- 元气 开发
52 | JIS -- 元気 開発
53 | KSC -- 元氣 開發
54 | BIG5 -- 元氣 開發
55 |
--------------------------------------------------------------------------------
/docs/pango_xft.md:
--------------------------------------------------------------------------------
1 | Title: Xft Fonts and Rendering
2 |
3 | The Xft library is a library for displaying fonts on the X window
4 | system; internally it uses the fontconfig library to locate font
5 | files, and the FreeType library to load and render fonts. The
6 | Xft backend is the recommended Pango font backend for screen
7 | display with X. (The Cairo back end is another possibility.)
8 |
9 | Using the Xft backend is generally straightforward;
10 | [func@PangoXft.get_context] creates a context for a specified display
11 | and screen. You can then create a [class@Pango.Layout] with that context
12 | and render it with [func@PangoXft.render_layout]. At a more advanced
13 | level, the low-level fontconfig options used for rendering fonts
14 | can be affected using [func@PangoXft.set_default_substitute], and
15 | [func@PangoXft.substitute_changed].
16 |
17 | A range of functions for drawing pieces of a layout, such as individual
18 | layout lines and glyphs strings are provided. You can also directly
19 | create a [class@PangoXft.Renderer]. Finally, in some advanced cases,
20 | it is useful to derive from [class@PangoXft.Renderer]. Deriving from
21 | [class@PangoXft.Renderer] is useful for two reasons. One reason is be
22 | to support custom attributes by overriding `PangoRendererClass` virtual
23 | functions like 'prepare_run' or 'draw_shape'. The other reason is to
24 | customize exactly how the final bits are drawn to the destination by
25 | overriding the `PangoXftRendererClass` virtual functions
26 | 'composite_glyphs' and 'composite_trapezoids'.
27 |
--------------------------------------------------------------------------------
/tools/gen-color-table.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl -w
2 |
3 | if (@ARGV != 1) {
4 | die "Usage: gen-colors.pl rgb.txt > pango-color-table.h\n";
5 | }
6 |
7 | open IN, $ARGV[0] || die "Cannot open $ARGV[0]: $!\n";
8 |
9 | @colors = ();
10 | while (defined($_ = )) {
11 | next if /^!/;
12 | if (!/^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+)\s+(.*\S)\s+$/) {
13 | die "Cannot parse line $_";
14 | }
15 |
16 | push @colors, [$1, $2, $3, $4];
17 | }
18 |
19 | @colors = sort { lc($a->[3]) cmp lc($b->[3]) } @colors;
20 |
21 | $offset = 0;
22 |
23 | $date = gmtime;
24 |
25 | print <[3];
37 |
38 | if ($offset != 0) {
39 | print qq(\n);
40 | }
41 | print qq( "$name\\0");
42 |
43 | $color->[4] = $offset;
44 | $offset += length($name) + 1;
45 | }
46 |
47 | print ";\n\n";
48 |
49 | print <[0];
63 | $green = $color->[1];
64 | $blue = $color->[2];
65 | $offset = $color->[4];
66 |
67 | if ($i != 0) {
68 | print ",\n";
69 | }
70 | print " { $offset, $red, $green, $blue }";
71 | $i++;
72 | }
73 |
74 | print "\n};\n";
75 |
--------------------------------------------------------------------------------
/utils/viewer-cairo.h:
--------------------------------------------------------------------------------
1 | /* viewer-cairo.h: Common headers for Cairo-based viewers
2 | *
3 | * Copyright (C) 1999,2004,2005 Red Hat, Inc.
4 | * Copyright (C) 2001 Sun Microsystems
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 | #ifndef VIEWER_CAIRO_H
22 | #define VIEWER_CAIRO_H
23 |
24 | #include
25 |
26 | #include "viewer.h"
27 |
28 | typedef struct _CairoViewerIface CairoViewerIface;
29 |
30 | struct _CairoViewerIface
31 | {
32 | const PangoViewer *backend_class;
33 |
34 | cairo_surface_t * (*create_surface) (gpointer instance,
35 | gpointer surface,
36 | int width,
37 | int height);
38 |
39 | void (*paint_background) (gpointer instance,
40 | cairo_t *cr);
41 | };
42 |
43 | gpointer cairo_viewer_iface_create (const CairoViewerIface **iface_out);
44 |
45 | void cairo_viewer_add_options (GOptionGroup *group);
46 |
47 | #endif /* VIEWER_CAIRO_H */
48 |
--------------------------------------------------------------------------------
/docs/pango_rendering.md:
--------------------------------------------------------------------------------
1 | ---
2 | Title: The Rendering Pipeline
3 | ---
4 |
5 | # The Rendering Pipeline
6 |
7 | The Pango rendering pipeline takes a string of Unicode characters, converts them
8 | it into glyphs, and renders them on some output medium. This section describes the
9 | various stages of this pipeline and the APIs that implement them.
10 |
11 |
12 |
13 |
14 |
15 |
16 | Itemization
17 | : breaks a piece of text into segments with consistent direction and shaping
18 | properties. Among other things, this determines which font to use for each
19 | character. Use [func@Pango.itemize] or [func@Pango.itemize_with_base_dir]
20 | to itemize text.
21 |
22 | Shaping
23 | : converts characters into glyphs. Use [func@Pango.shape],
24 | [func@Pango.shape_full] or [func@Pango.shape_item] to shape text.
25 |
26 | Line Breaking
27 | : determines where line breaks should be inserted into a sequence of glyphs.
28 | The functions [func@Pango.default_break], [func@Pango.tailor_break] and
29 | [func@Pango.attr_break] determine possible line breaks. The actual line
30 | breaking is done by [class@Pango.Layout].
31 |
32 | Justification
33 | : adjusts inter-word spacing to form lines of even length. This is done by
34 | [class@Pango.Layout].
35 |
36 | Rendering
37 | : takes a string of positioned glyphs, and renders them onto a surface.
38 | This is accomplished by a [class@Pango.Renderer] object. The functions
39 | pango_cairo_show_glyph_string() and pango_cairo_show_layout() use a
40 | [class@Pango.Renderer] to draw text onto a cairo surface.
41 |
--------------------------------------------------------------------------------
/pango/pango-context-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-context-private.h: Internal structures of PangoContext
3 | *
4 | * Copyright (C) 2004 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_CONTEXT_PRIVATE_H__
23 | #define __PANGO_CONTEXT_PRIVATE_H__
24 |
25 | #include
26 |
27 | G_BEGIN_DECLS
28 |
29 | struct _PangoContext
30 | {
31 | GObject parent_instance;
32 | guint serial;
33 | guint fontmap_serial;
34 |
35 | PangoLanguage *set_language;
36 | PangoLanguage *language;
37 | PangoDirection base_dir;
38 | PangoGravity base_gravity;
39 | PangoGravity resolved_gravity;
40 | PangoGravityHint gravity_hint;
41 |
42 | PangoFontDescription *font_desc;
43 |
44 | PangoMatrix *matrix;
45 |
46 | PangoFontMap *font_map;
47 |
48 | PangoFontMetrics *metrics;
49 |
50 | gboolean round_glyph_positions;
51 | };
52 |
53 | G_END_DECLS
54 |
55 | #endif /* __PANGO_CONTEXT_PRIVATE_H__ */
56 |
57 |
--------------------------------------------------------------------------------
/.gitlab-ci/README.md:
--------------------------------------------------------------------------------
1 | ## Pango CI infrastructure
2 |
3 | Pango uses different CI images depending on platform and jobs.
4 |
5 | The CI images are Docker containers, generated either using `docker` or
6 | `podman`, and pushed to the GitLab [container registry][registry].
7 |
8 | Each Docker image has a tag composed of two parts:
9 |
10 | - `${image}`: the base image for a given platform, like "fedora" or
11 | "debian-stable"
12 | - `${number}`: an incremental version number, or `latest`
13 |
14 | See the [container registry][registry] for the available images for each
15 | branch, as well as their available versions.
16 |
17 | ### Checklist for Updating a CI image
18 |
19 | - [ ] Update the `${image}.Dockerfile` file with the dependencies
20 | - [ ] Run `./run-docker.sh build --base ${image} --base-version ${number}`
21 | - [ ] Run `./run-docker.sh push --base ${image} --base-version ${number}`
22 | once the Docker image is built; you may need to log in by using
23 | `docker login` or `podman login`
24 | - [ ] Update the `image` keys in the `.gitlab-ci.yml` file with the new
25 | image tag
26 | - [ ] Open a merge request with your changes and let it run
27 |
28 | ### Checklist for Adding a new CI image
29 |
30 | - [ ] Write a new `${image}.Dockerfile` with the instructions to set up
31 | a build environment
32 | - [ ] Add the `pip3 install meson` incantation
33 | - [ ] Run `./run-docker.sh build --base ${image} --base-version ${number}`
34 | - [ ] Run `./run-docker.sh push --base ${image} --base-version ${number}`
35 | - [ ] Add the new job to `.gitlab-ci.yml` referencing the image
36 | - [ ] Open a merge request with your changes and let it run
37 |
38 | [registry]: https://gitlab.gnome.org/GNOME/pango/container_registry
39 |
--------------------------------------------------------------------------------
/pango/pango-trace-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-trace-private.h:
3 | *
4 | * Copyright (C) 2020 Red Hat, Inc
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Lesser General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Lesser General Public
17 | * License along with this library. If not, see .
18 | */
19 |
20 | #pragma once
21 |
22 |
23 | #ifdef HAVE_SYSPROF
24 | #include
25 | #endif
26 |
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | #ifdef HAVE_SYSPROF
32 | #define PANGO_TRACE_CURRENT_TIME SYSPROF_CAPTURE_CURRENT_TIME
33 | #else
34 | #define PANGO_TRACE_CURRENT_TIME 0
35 | #endif
36 |
37 | void pango_trace_mark (gint64 begin_time,
38 | const gchar *name,
39 | const gchar *message_format,
40 | ...) G_GNUC_PRINTF (3, 4);
41 |
42 | #ifndef HAVE_SYSPROF
43 | /* Optimise the whole call out */
44 | #if defined(G_HAVE_ISO_VARARGS)
45 | #define pango_trace_mark(b, n, m, ...) G_STMT_START { } G_STMT_END
46 | #elif defined(G_HAVE_GNUC_VARARGS)
47 | #define pango_trace_mark(b, n, m...) G_STMT_START { } G_STMT_END
48 | #else
49 | /* no varargs macro support; the call will have to be optimised out by the compiler */
50 | #endif
51 | #endif
52 |
53 | G_END_DECLS
54 |
--------------------------------------------------------------------------------
/pango/pango-script-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-script-private.h: Script tag handling, private definitions
3 | *
4 | * Copyright (C) 2002 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_SCRIPT_PRIVATE_H__
23 | #define __PANGO_SCRIPT_PRIVATE_H__
24 |
25 | #define PAREN_STACK_DEPTH 128
26 |
27 | typedef struct _ParenStackEntry ParenStackEntry;
28 |
29 | struct _ParenStackEntry
30 | {
31 | int pair_index;
32 | PangoScript script_code;
33 | };
34 |
35 | struct _PangoScriptIter
36 | {
37 | const gchar *text_start;
38 | const gchar *text_end;
39 |
40 | const gchar *script_start;
41 | const gchar *script_end;
42 | PangoScript script_code;
43 |
44 | ParenStackEntry paren_stack[PAREN_STACK_DEPTH];
45 | int paren_sp;
46 | };
47 |
48 | PangoScriptIter *
49 | _pango_script_iter_init (PangoScriptIter *iter,
50 | const char *text,
51 | int length);
52 |
53 | void
54 | _pango_script_iter_fini (PangoScriptIter *iter);
55 |
56 | #endif /* __PANGO_SCRIPT_PRIVATE_H__ */
57 |
--------------------------------------------------------------------------------
/tests/breaks/seventeen.expected:
--------------------------------------------------------------------------------
1 | Text: É s [ ] u n a [ ] p r o v a [ ] d ' i n s t a l · l a c i ó [0x0a] É s [ ] u n a [ ] p r o v a [ ] d ' i n s t a l · l a c i ó [0x0a] É s [ ] u n a [ ] p r o v a [ ] d ' i n s t a l · l a c i ó [0x0a]
2 | Breaks: c c c lc c c c lc c c c c c lc c c c c c c c c c c c c c c Lc c c lc c c c lc c c c c c lc c c c c c c c c c c c c c c Lc c c lc c c c lc c c c c c lc c c c c c c c c c c c c c c Lc
3 | Whitespace: x x x w x x x w x x x w w
4 | Sentences: bs e bs e bs e b
5 | Words: bs be bs be bs be bs e s be bs be bs be bs be bs e s be bs be bs be bs be bs e s e s be b
6 | Graphemes: b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b
7 | Hyphens: i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i
8 |
--------------------------------------------------------------------------------
/pango/pangocoretext.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocoretext.h:
3 | *
4 | * Copyright (C) 2005 Imendio AB
5 | * Copyright (C) 2010 Kristian Rietveld
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Library General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Library General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Library General Public
18 | * License along with this library; if not, write to the
19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 | * Boston, MA 02111-1307, USA.
21 | */
22 |
23 | #ifndef __PANGOCORETEXT_H__
24 | #define __PANGOCORETEXT_H__
25 |
26 | #include
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | #define PANGO_TYPE_CORE_TEXT_FONT (pango_core_text_font_get_type ())
32 | #define PANGO_CORE_TEXT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CORE_TEXT_FONT, PangoCoreTextFont))
33 | #define PANGO_IS_CORE_TEXT_FONT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CORE_TEXT_FONT))
34 |
35 | typedef struct _PangoCoreTextFont PangoCoreTextFont;
36 | typedef struct _PangoCoreTextFontClass PangoCoreTextFontClass;
37 |
38 |
39 | PANGO_AVAILABLE_IN_ALL
40 | GType pango_core_text_font_get_type (void) G_GNUC_CONST;
41 |
42 | PANGO_AVAILABLE_IN_1_24
43 | CTFontRef pango_core_text_font_get_ctfont (PangoCoreTextFont *font);
44 |
45 | G_END_DECLS
46 |
47 | #endif /* __PANGOCORETEXT_H__ */
48 |
--------------------------------------------------------------------------------
/pango/pango-fontmap-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-font.h: Font handling
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_FONTMAP_PRIVATE_H__
23 | #define __PANGO_FONTMAP_PRIVATE_H__
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | typedef struct {
32 | PangoFont * (* reload_font) (PangoFontMap *fontmap,
33 | PangoFont *font,
34 | double scale,
35 | PangoContext *context,
36 | const char *variations);
37 |
38 | gboolean (* add_font_file) (PangoFontMap *fontmap,
39 | const char *filename,
40 | GError **error);
41 |
42 | } PangoFontMapClassPrivate;
43 |
44 | PANGO_DEPRECATED_IN_1_38
45 | const char *pango_font_map_get_shape_engine_type (PangoFontMap *fontmap);
46 |
47 | G_END_DECLS
48 |
49 | #endif /* __PANGO_FONTMAP_PRIVATE_H__ */
50 |
--------------------------------------------------------------------------------
/pango.doap:
--------------------------------------------------------------------------------
1 |
6 |
7 | pango
8 | Internationalized text layout and rendering library
9 | Pango is a library for layout and rendering of text, with an emphasis on internationalization. Pango can be used anywhere that text layout is needed. Pango forms the core of text and font handling for GTK.
10 |
11 | C
12 |
13 |
15 |
17 |
19 |
21 |
22 |
23 |
24 | Owen Taylor
25 |
26 | otaylor
27 |
28 |
29 |
30 |
31 | Matthias Clasen
32 |
33 | matthiasc
34 |
35 |
36 |
37 |
38 | Emmanuele Bassi
39 |
40 | ebassi
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/tests/validate-log-attrs.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | *
3 | * Copyright (C) 1999 Red Hat Software
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Library General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2 of the License, or (at your option) any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Library General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Library General Public
16 | * License along with this library; if not, write to the
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 | * Boston, MA 02111-1307, USA.
19 | */
20 |
21 | #ifndef __VALIDATE_LOG_ATTRS_H__
22 | #define __VALIDATE_LOG_ATTRS_H__
23 |
24 | #include
25 |
26 | G_BEGIN_DECLS
27 |
28 | #include
29 |
30 | #define PANGO_VALIDATE_ERROR (pango_validate_error_quark ())
31 |
32 | typedef enum
33 | {
34 | PANGO_VALIDATE_ERROR_FAILED,
35 | PANGO_VALIDATE_ERROR_BREAK,
36 | PANGO_VALIDATE_ERROR_GRAPHEME,
37 | PANGO_VALIDATE_ERROR_WORD,
38 | PANGO_VALIDATE_ERROR_SENTENCE,
39 | PANGO_VALIDATE_ERROR_SPACE
40 | } PangoValidateError;
41 |
42 | GQuark pango_validate_error_quark (void);
43 |
44 | gboolean pango_validate_log_attrs (const char *text,
45 | int length,
46 | const PangoLogAttr *log_attrs,
47 | int attrs_len,
48 | GError **error);
49 |
50 | G_END_DECLS
51 |
52 | #endif /* __VALIDATE_LOG_ATTRS_H__ */
53 |
--------------------------------------------------------------------------------
/docs/pango.types.in:
--------------------------------------------------------------------------------
1 | pango_alignment_get_type
2 | pango_attr_iterator_get_type
3 | pango_attr_list_get_type
4 | pango_attr_type_get_type
5 | pango_attribute_get_type
6 | pango_bidi_type_get_type
7 | pango_cairo_fc_font_get_type
8 | pango_cairo_fc_font_map_get_type
9 | pango_cairo_font_get_type
10 | pango_cairo_font_map_get_type
11 | pango_cairo_renderer_get_type
12 | pango_color_get_type
13 | pango_context_get_type
14 | pango_coverage_get_type
15 | pango_coverage_level_get_type
16 | pango_direction_get_type
17 | pango_ellipsize_mode_get_type
18 | pango_engine_get_type
19 | pango_engine_lang_get_type
20 | pango_engine_shape_get_type
21 | pango_fc_decoder_get_type
22 | pango_fc_font_get_type
23 | pango_fc_font_map_get_type
24 | pango_font_description_get_type
25 | pango_font_face_get_type
26 | pango_font_family_get_type
27 | pango_font_get_type
28 | pango_font_map_get_type
29 | pango_font_mask_get_type
30 | pango_font_metrics_get_type
31 | pango_fontset_get_type
32 | pango_fontset_simple_get_type
33 | pango_ft2_font_get_type
34 | pango_ft2_font_map_get_type
35 | pango_ft2_renderer_get_type
36 | pango_glyph_item_get_type
37 | pango_glyph_item_iter_get_type
38 | pango_glyph_string_get_type
39 | pango_gravity_get_type
40 | pango_gravity_hint_get_type
41 | pango_item_get_type
42 | pango_language_get_type
43 | pango_layout_get_type
44 | pango_layout_iter_get_type
45 | pango_layout_line_get_type
46 | pango_matrix_get_type
47 | pango_ot_info_get_type
48 | pango_ot_ruleset_get_type
49 | pango_render_part_get_type
50 | pango_renderer_get_type
51 | pango_script_get_type
52 | pango_script_iter_get_type
53 | pango_shape_flags_get_type
54 | pango_show_flags_get_type
55 | pango_stretch_get_type
56 | pango_style_get_type
57 | pango_tab_align_get_type
58 | pango_tab_array_get_type
59 | pango_underline_get_type
60 | pango_variant_get_type
61 | pango_weight_get_type
62 | pango_wrap_mode_get_type
63 | pango_xft_font_get_type
64 | pango_xft_font_map_get_type
65 | pango_xft_renderer_get_type
66 |
--------------------------------------------------------------------------------
/meson.options:
--------------------------------------------------------------------------------
1 | option('documentation',
2 | type: 'boolean',
3 | value: false,
4 | description : 'Build API reference')
5 |
6 | option('gtk_doc',
7 | type: 'boolean',
8 | value: false,
9 | description: 'Build API reference',
10 | deprecated: 'documentation')
11 |
12 | option('man-pages',
13 | type: 'boolean',
14 | value: false,
15 | description : 'Build man pages for installed tools')
16 |
17 | option('introspection',
18 | type: 'feature',
19 | value: 'auto',
20 | yield: true,
21 | description: 'Build the introspection data (requires gobject-introspection)')
22 |
23 | option('build-testsuite',
24 | description : 'Build the test suite',
25 | type: 'boolean',
26 | value: true)
27 |
28 | option('build-examples',
29 | description : 'Build example test programs',
30 | type: 'boolean',
31 | value: true)
32 |
33 | option('fontconfig',
34 | description : 'Build with FontConfig support. Passing \'auto\' or \'disabled\' disables fontconfig where it is optional, i.e. on Windows and macOS. Passing \'disabled\' on platforms where fontconfig is required results in error.',
35 | type: 'feature',
36 | value: 'auto')
37 |
38 | option('sysprof',
39 | type : 'feature',
40 | value : 'disabled',
41 | description : 'Include tracing support for sysprof')
42 |
43 | option('libthai',
44 | type : 'feature',
45 | value : 'auto',
46 | description : 'Build with libthai support')
47 |
48 | option('cairo',
49 | type : 'feature',
50 | value : 'enabled',
51 | description : 'Build with cairo support')
52 |
53 | option('xft',
54 | type : 'feature',
55 | value : 'auto',
56 | description : 'Build with xft support')
57 |
58 | option('freetype',
59 | type : 'feature',
60 | value : 'auto',
61 | description : 'Build with freetype support')
62 |
--------------------------------------------------------------------------------
/utils/viewer-cocoa.h:
--------------------------------------------------------------------------------
1 | /* viewer-cocoa.h: Header for Cocoa-based viewer
2 | *
3 | * Copyright (C) 2025 Khaled Hosny
4 | *
5 | * This library is free software; you can redistribute it and/or
6 | * modify it under the terms of the GNU Library General Public
7 | * License as published by the Free Software Foundation; either
8 | * version 2 of the License, or (at your option) any later version.
9 | *
10 | * This library is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | * Library General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU Library General Public
16 | * License along with this library; if not, write to the
17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 | * Boston, MA 02111-1307, USA.
19 | */
20 | #ifndef VIEWER_COCOA_H
21 | #define VIEWER_COCOA_H
22 |
23 | #include
24 | #include "viewer.h"
25 |
26 | typedef struct _CocoaViewer CocoaViewer;
27 |
28 | extern const PangoViewer cocoa_viewer;
29 |
30 | gpointer cocoa_view_create (const PangoViewer *klass);
31 |
32 | void cocoa_view_destroy (gpointer instance);
33 |
34 | gpointer cocoa_view_create_surface (gpointer instance,
35 | int width,
36 | int height);
37 |
38 | void cocoa_view_destroy_surface (gpointer instance,
39 | gpointer surface);
40 |
41 | gpointer cocoa_view_create_window (gpointer instance,
42 | const char *title,
43 | int width,
44 | int height);
45 |
46 | void cocoa_view_destroy_window (gpointer instance,
47 | gpointer window);
48 |
49 | gpointer cocoa_view_display (gpointer instance,
50 | gpointer surface,
51 | gpointer window,
52 | int width,
53 | int height,
54 | gpointer state);
55 |
56 | #endif /* VIEWER_COCOA_H */
57 |
--------------------------------------------------------------------------------
/pango/pango-attributes-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-attributes-private.h: Internal structures of PangoLayout
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public
15 | * License along with this library; if not, write to the
16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 | * Boston, MA 02111-1307, USA.
18 | */
19 |
20 | #ifndef __PANGO_ATTRIBUTES_PRIVATE_H__
21 | #define __PANGO_ATTRIBUTES_PRIVATE_H__
22 |
23 | struct _PangoAttrIterator
24 | {
25 | GPtrArray *attrs; /* From the list */
26 | guint n_attrs; /* Copied from the list */
27 |
28 | GPtrArray *attribute_stack;
29 |
30 | guint attr_index;
31 | guint start_index;
32 | guint end_index;
33 | };
34 |
35 | struct _PangoAttrList
36 | {
37 | guint ref_count;
38 | GPtrArray *attributes;
39 | };
40 |
41 | void _pango_attr_list_init (PangoAttrList *list);
42 | void _pango_attr_list_destroy (PangoAttrList *list);
43 | gboolean _pango_attr_list_has_attributes (const PangoAttrList *list);
44 |
45 | void _pango_attr_list_get_iterator (PangoAttrList *list,
46 | PangoAttrIterator *iterator);
47 |
48 | void _pango_attr_iterator_destroy (PangoAttrIterator *iterator);
49 | gboolean pango_attr_iterator_advance (PangoAttrIterator *iterator,
50 | int index);
51 |
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/pango/pango-utils-internal.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-utils.c: Utilities for internal functions and modules
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_UTILS_INTERNAL_H__
23 | #define __PANGO_UTILS_INTERNAL_H__
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | gboolean _pango_scan_int (const char **pos,
32 | int *out);
33 |
34 | gboolean _pango_parse_enum (GType type,
35 | const char *str,
36 | int *value,
37 | gboolean warn,
38 | char **possible_values);
39 | gboolean pango_parse_flags (GType type,
40 | const char *str,
41 | int *value,
42 | char **possible_values);
43 |
44 | char *_pango_trim_string (const char *str);
45 |
46 |
47 | G_END_DECLS
48 |
49 | #endif /* __PANGO_UTILS_H__ */
50 |
--------------------------------------------------------------------------------
/pango/pango-emoji-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-emoji-private.h: Emoji handling, private definitions
3 | *
4 | * Copyright (C) 2017 Google, Inc.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_EMOJI_PRIVATE_H__
23 | #define __PANGO_EMOJI_PRIVATE_H__
24 |
25 | #include
26 |
27 | gboolean
28 | _pango_Is_Emoji_Base_Character (gunichar ch);
29 |
30 | gboolean
31 | _pango_Is_Emoji_Extended_Pictographic (gunichar ch);
32 |
33 | typedef struct _PangoEmojiIter PangoEmojiIter;
34 |
35 | struct _PangoEmojiIter
36 | {
37 | const gchar *text_start;
38 | const gchar *text_end;
39 | const gchar *start;
40 | const gchar *end;
41 | gboolean is_emoji;
42 | gboolean has_vs;
43 |
44 | unsigned char *types;
45 | unsigned char types_[64];
46 | unsigned int n_chars;
47 | unsigned int cursor;
48 | };
49 |
50 | PangoEmojiIter *
51 | _pango_emoji_iter_init (PangoEmojiIter *iter,
52 | const char *text,
53 | int length,
54 | unsigned int n_chars);
55 |
56 | gboolean
57 | _pango_emoji_iter_next (PangoEmojiIter *iter);
58 |
59 | void
60 | _pango_emoji_iter_fini (PangoEmojiIter *iter);
61 |
62 | #endif /* __PANGO_EMOJI_PRIVATE_H__ */
63 |
--------------------------------------------------------------------------------
/tests/fonts/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /tmp/cache
5 |
6 |
7 |
8 | false
9 |
10 |
11 |
12 | pixelsize
13 | pixelsize
14 |
15 |
16 |
17 |
18 |
19 |
20 | false
21 |
22 |
23 | 1.0
24 |
25 |
26 |
27 | matrix
28 |
29 | pixelsizefixupfactor 0
30 | 0 pixelsizefixupfactor
31 |
32 |
33 |
34 |
35 |
36 | size
37 | pixelsizefixupfactor
38 |
39 |
40 |
41 |
42 |
43 | Noto Color Emoji
44 | emoji
45 |
46 |
47 |
48 |
49 | und-zsye
50 |
51 |
52 | emoji
53 |
54 |
55 | emoji
56 |
57 |
58 |
59 |
60 | emoji
61 |
62 | Noto Color Emoji
63 |
64 |
65 |
66 |
67 | monospace
68 | DejaVu Sans Mono
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/tests/nofonts/fonts.conf:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /tmp/cache
5 |
6 |
7 |
8 | false
9 |
10 |
11 |
12 | pixelsize
13 | pixelsize
14 |
15 |
16 |
17 |
18 |
19 |
20 | false
21 |
22 |
23 | 1.0
24 |
25 |
26 |
27 | matrix
28 |
29 | pixelsizefixupfactor 0
30 | 0 pixelsizefixupfactor
31 |
32 |
33 |
34 |
35 |
36 | size
37 | pixelsizefixupfactor
38 |
39 |
40 |
41 |
42 |
43 | Noto Color Emoji
44 | emoji
45 |
46 |
47 |
48 |
49 | und-zsye
50 |
51 |
52 | emoji
53 |
54 |
55 | emoji
56 |
57 |
58 |
59 |
60 | emoji
61 |
62 | Noto Color Emoji
63 |
64 |
65 |
66 |
67 | monospace
68 | DejaVu Sans Mono
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/pango/pango.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango.h:
3 | *
4 | * Copyright (C) 1999 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_H__
23 | #define __PANGO_H__
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 | #include
44 | #include
45 | #include
46 | #include
47 | #include
48 | #include
49 | #include
50 | #include
51 | #include
52 | #include
53 |
54 | #endif /* __PANGO_H__ */
55 |
--------------------------------------------------------------------------------
/pango/pangocairo-coretextfont.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocairo-coretextfont.c
3 | *
4 | * Copyright (C) 2005 Imendio AB
5 | * Copyright (C) 2010 Kristian Rietveld
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Library General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Library General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Library General Public
18 | * License along with this library; if not, write to the
19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 | * Boston, MA 02111-1307, USA.
21 | */
22 |
23 | #ifndef __PANGOCAIRO_CORETEXTFONT_H__
24 | #define __PANGOCAIRO_CORETEXTFONT_H__
25 |
26 | #define PANGO_TYPE_CAIRO_CORE_TEXT_FONT (pango_cairo_core_text_font_get_type ())
27 | #define PANGO_CAIRO_CORE_TEXT_FONT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_CORE_TEXT_FONT, PangoCairoCoreTextFont))
28 | #define PANGO_CAIRO_CORE_TEXT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_CAIRO_CORE_TEXT_FONT, PangoCairoCoreTextFontClass))
29 | #define PANGO_IS_CAIRO_CORE_TEXT_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_CAIRO_CORE_TEXT_FONT))
30 | #define PANGO_CAIRO_CORE_TEXT_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_CAIRO_CORE_TEXT_FONT, PangoCairoCoreTextFontClass))
31 |
32 | typedef struct _PangoCairoCoreTextFont PangoCairoCoreTextFont;
33 | typedef struct _PangoCairoCoreTextFontClass PangoCairoCoreTextFontClass;
34 |
35 | _PANGO_EXTERN
36 | GType pango_cairo_core_text_font_get_type (void) G_GNUC_CONST;
37 |
38 | #endif /* __PANGOCAIRO_CORETEXTFONT_H__ */
39 |
--------------------------------------------------------------------------------
/tools/gen-emoji-table.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python
2 |
3 | from __future__ import print_function, division, absolute_import
4 | import sys
5 | import os.path
6 | from collections import OrderedDict
7 |
8 | if len (sys.argv) != 2:
9 | print("usage: ./gen-emoji-table.py emoji-data.txt", file=sys.stderr)
10 | sys.exit (1)
11 |
12 | f = open(sys.argv[1])
13 | header = [f.readline () for _ in range(10)]
14 |
15 | ranges = OrderedDict()
16 | for line in f.readlines():
17 | line = line.strip()
18 | if not line or line[0] == '#':
19 | continue
20 | rang, typ = [s.strip() for s in line.split('#')[0].split(';')[:2]]
21 |
22 | rang = [int(s, 16) for s in rang.split('..')]
23 | if len(rang) > 1:
24 | start, end = rang
25 | else:
26 | start = end = rang[0]
27 |
28 | if typ not in ranges:
29 | ranges[typ] = []
30 | if ranges[typ] and ranges[typ][-1][1] == start - 1:
31 | ranges[typ][-1] = (ranges[typ][-1][0], end)
32 | else:
33 | ranges[typ].append((start, end))
34 |
35 |
36 |
37 | print("/* == Start of generated table == */")
38 | print("/*")
39 | print(" * The following tables are generated by running:")
40 | print(" *")
41 | print(" * ./gen-emoji-table.py emoji-data.txt")
42 | print(" *")
43 | print(" * on file with this header:")
44 | print(" *")
45 | for l in header:
46 | print(" * %s" % (l.strip()))
47 | print(" */")
48 | print()
49 | print("#ifndef PANGO_EMOJI_TABLE_H")
50 | print("#define PANGO_EMOJI_TABLE_H")
51 | print()
52 | print("#include ")
53 | print()
54 | print("struct Interval {\n gunichar start, end;\n};")
55 |
56 | for typ,s in ranges.items():
57 | if typ not in ['Emoji',
58 | 'Emoji_Presentation',
59 | 'Emoji_Modifier',
60 | 'Emoji_Modifier_Base',
61 | 'Extended_Pictographic']: continue
62 | print()
63 | print("static const struct Interval _pango_%s_table[] =" % typ)
64 | print("{")
65 | for pair in sorted(s):
66 | print(" {0x%04X, 0x%04X}," % pair)
67 | print("};")
68 |
69 | print()
70 | print("#endif /* PANGO_EMOJI_TABLE_H */")
71 | print()
72 | print("/* == End of generated table == */")
73 |
--------------------------------------------------------------------------------
/pango/pangocairo-fc.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocairo-fc.h: Private header file for Cairo/fontconfig combination
3 | *
4 | * Copyright (C) 2005 Red Hat, Inc.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGOCAIRO_FC_H__
23 | #define __PANGOCAIRO_FC_H__
24 |
25 | #include
26 | #include
27 |
28 | G_BEGIN_DECLS
29 |
30 | #ifdef __GI_SCANNER__
31 | #define PANGO_CAIRO_TYPE_FC_FONT_MAP (pango_cairo_fc_font_map_get_type())
32 | #define PANGO_CAIRO_FC_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANGO_CAIRO_TYPE_FC_FONT_MAP, PangoCairoFcFontMap))
33 | #define PANGO_CAIRO_IS_FC_FONT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANGO_CAIRO_TYPE_FC_FONT_MAP))
34 | #else
35 | #define PANGO_TYPE_CAIRO_FC_FONT_MAP (pango_cairo_fc_font_map_get_type ())
36 | #define PANGO_CAIRO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_FC_FONT_MAP, PangoCairoFcFontMap))
37 | #define PANGO_IS_CAIRO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_FC_FONT_MAP))
38 | #endif
39 |
40 | typedef struct _PangoCairoFcFontMap PangoCairoFcFontMap;
41 |
42 | PANGO_AVAILABLE_IN_ALL
43 | GType pango_cairo_fc_font_map_get_type (void) G_GNUC_CONST;
44 |
45 | G_END_DECLS
46 |
47 | #endif /* __PANGOCAIRO_FC_H__ */
48 |
49 |
--------------------------------------------------------------------------------
/pango/pangowin32-private.hpp:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangowin32-private.hpp: C++ header-only utility code
3 | *
4 | * Copyright (C) 2023 Chun-wei Fan
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGOWIN32_PRIVATE_HPP__
23 | #define __PANGOWIN32_PRIVATE_HPP__
24 |
25 | /* We are likely to use items from the following by including this header */
26 | #include "pangowin32-private.h"
27 |
28 | struct _PangoWin32DWriteItems
29 | {
30 | IDWriteFactory5 *dwrite_factory5;
31 | IDWriteFactory3 *dwrite_factory3;
32 | IDWriteFactory *dwrite_factory;
33 | IDWriteGdiInterop *gdi_interop;
34 | guint have_idwritefactory5 : 1;
35 | guint have_idwritefactory3 : 1;
36 | };
37 |
38 | /* Releases a COM object and clears it */
39 | template
40 | inline void pangowin32_release_com_obj (com_interface **curr_obj)
41 | {
42 | if (*curr_obj != NULL)
43 | {
44 | (*curr_obj)->Release ();
45 | *curr_obj = NULL;
46 | }
47 | }
48 |
49 | /* Acquires an additional reference, if non-null */
50 | template
51 | inline com_interface* pangowin32_acquire_com_obj (com_interface *new_obj)
52 | {
53 | if (new_obj != NULL)
54 | new_obj->AddRef ();
55 |
56 | return new_obj;
57 | }
58 |
59 | #endif /* __PANGOWIN32_PRIVATE_HPP__ */
60 |
--------------------------------------------------------------------------------
/pango/pangocairo-win32.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocairo-win32.h: Private header file for Cairo/Win32 combination
3 | *
4 | * Copyright (C) 2005 Red Hat, Inc.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGOCAIRO_WIN32_H__
23 | #define __PANGOCAIRO_WIN32_H__
24 |
25 | #include
26 | #include "pangowin32-private.h"
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | #define PANGO_TYPE_CAIRO_WIN32_FONT_MAP (pango_cairo_win32_font_map_get_type ())
32 | #define PANGO_CAIRO_WIN32_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_WIN32_FONT_MAP, PangoCairoWin32FontMap))
33 | #define PANGO_IS_CAIRO_WIN32_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_WIN32_FONT_MAP))
34 |
35 | typedef struct _PangoCairoWin32FontMap PangoCairoWin32FontMap;
36 |
37 | struct _PangoCairoWin32FontMap
38 | {
39 | PangoWin32FontMap parent_instance;
40 | };
41 |
42 | PANGO_AVAILABLE_IN_ALL
43 | GType pango_cairo_win32_font_map_get_type (void) G_GNUC_CONST;
44 |
45 | PangoFont *_pango_cairo_win32_font_new (PangoCairoWin32FontMap *cwfontmap,
46 | PangoContext *context,
47 | PangoWin32Face *face,
48 | const PangoFontDescription *desc);
49 | G_END_DECLS
50 |
51 | #endif /* __PANGOCAIRO_WIN32_H__ */
52 |
53 |
--------------------------------------------------------------------------------
/tests/test-layout2.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2025 Red Hat, Inc
3 | *
4 | * This library is free software; you can redistribute it and/or
5 | * modify it under the terms of the GNU Library General Public
6 | * License as published by the Free Software Foundation; either
7 | * version 2 of the License, or (at your option) any later version.
8 | *
9 | * This library is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 | * Library General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU Library General Public
15 | * License along with this library; if not, write to the
16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 | * Boston, MA 02111-1307, USA.
18 | */
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | const char bad_layout[] =
25 | "{\n"
26 | " \"text\" : \"r ﻞُﻠُﺼّﺒُﻠُﻠﺼّﺑُﺭﺭً ॣ ॣh ॣ ॣ 冗\",\n"
27 | " \"wrap\" : \"word-char\",\n"
28 | " \"width\" : 0\n"
29 | "}";
30 |
31 | static void
32 | test_bad_layout (void)
33 | {
34 | GError *error = NULL;
35 | GBytes *orig;
36 | PangoContext *context;
37 | PangoLayout *layout;
38 | GBytes *bytes;
39 |
40 | orig = g_bytes_new (bad_layout, sizeof (bad_layout));
41 |
42 | context = pango_font_map_create_context (pango_cairo_font_map_get_default ());
43 | layout = pango_layout_deserialize (context, orig, PANGO_LAYOUT_DESERIALIZE_CONTEXT, &error);
44 | g_assert_no_error (error);
45 |
46 | bytes = pango_layout_serialize (layout, PANGO_LAYOUT_SERIALIZE_CONTEXT | PANGO_LAYOUT_SERIALIZE_OUTPUT);
47 |
48 | g_assert_nonnull (bytes);
49 | g_bytes_unref (bytes);
50 |
51 | g_object_unref (layout);
52 | g_object_unref (context);
53 |
54 | g_bytes_unref (orig);
55 | }
56 |
57 | int
58 | main (int argc, char *argv[])
59 | {
60 | g_test_init (&argc, &argv, NULL);
61 |
62 | g_test_add_func ("/layout/bad.layout", test_bad_layout);
63 |
64 | return g_test_run ();
65 | }
66 |
--------------------------------------------------------------------------------
/pango/pangocairo-coretext.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangocairo-coretext.h:
3 | *
4 | * Copyright (C) 2005 Imendio AB
5 | * Copyright (C) 2010 Kristian Rietveld
6 | *
7 | * This library is free software; you can redistribute it and/or
8 | * modify it under the terms of the GNU Library General Public
9 | * License as published by the Free Software Foundation; either
10 | * version 2 of the License, or (at your option) any later version.
11 | *
12 | * This library is distributed in the hope that it will be useful,
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 | * Library General Public License for more details.
16 | *
17 | * You should have received a copy of the GNU Library General Public
18 | * License along with this library; if not, write to the
19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 | * Boston, MA 02111-1307, USA.
21 | */
22 |
23 | #ifndef __PANGOCAIRO_CORETEXT_H__
24 | #define __PANGOCAIRO_CORETEXT_H__
25 |
26 | #include "pangocoretext-private.h"
27 | #include
28 | #include
29 |
30 | G_BEGIN_DECLS
31 |
32 | #define PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP (pango_cairo_core_text_font_map_get_type ())
33 | #define PANGO_CAIRO_CORE_TEXT_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP, PangoCairoCoreTextFontMap))
34 | #define PANGO_IS_CAIRO_CORE_TEXT_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_CAIRO_CORE_TEXT_FONT_MAP))
35 |
36 | typedef struct _PangoCairoCoreTextFontMap PangoCairoCoreTextFontMap;
37 |
38 | struct _PangoCairoCoreTextFontMap
39 | {
40 | PangoCoreTextFontMap parent_instance;
41 |
42 | guint serial;
43 | gdouble dpi;
44 | };
45 |
46 | _PANGO_EXTERN
47 | GType pango_cairo_core_text_font_map_get_type (void) G_GNUC_CONST;
48 |
49 | PangoCoreTextFont *
50 | _pango_cairo_core_text_font_new (PangoCairoCoreTextFontMap *cafontmap,
51 | PangoCoreTextFontKey *key);
52 |
53 | G_END_DECLS
54 |
55 | #endif /* __PANGOCAIRO_CORETEXT_H__ */
56 |
--------------------------------------------------------------------------------
/pango/break-latin.c:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * break-latin.c:
3 | *
4 | * Copyright (C) 2021 Jordi Mas i Hernàndez
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the Free Software
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 | */
20 |
21 | #include "config.h"
22 |
23 | #include "pango-break.h"
24 | #include "pango-impl-utils.h"
25 |
26 | static void
27 | break_latin (const char *text,
28 | int length,
29 | const PangoAnalysis *analysis,
30 | PangoLogAttr *attrs,
31 | int attrs_len G_GNUC_UNUSED)
32 | {
33 | int i;
34 | const char *p, *next;
35 | gunichar wc, prev_wc;
36 |
37 | if (!analysis || !analysis->language ||
38 | g_ascii_strncasecmp (pango_language_to_string (analysis->language), "ca-", 3) != 0)
39 | return;
40 |
41 | for (p = text, i = 0, prev_wc = 0;
42 | p < text + length;
43 | p = next, i++, prev_wc = wc)
44 | {
45 | wc = g_utf8_get_char (p);
46 | next = g_utf8_next_char (p);
47 |
48 | /* Catalan middle dot does not break words */
49 | if (wc == 0x00b7)
50 | {
51 | gunichar middle_next = g_utf8_get_char (next);
52 | if (g_unichar_tolower (middle_next) == 'l' && g_unichar_tolower (prev_wc) == 'l')
53 | {
54 | attrs[i].is_word_end = FALSE;
55 | attrs[i+1].is_word_start = FALSE;
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/utils/viewer-x.h:
--------------------------------------------------------------------------------
1 | /* viewer-x.h: Common headers for X-based viewers
2 | *
3 | * Copyright (C) 1999,2004,2005 Red Hat, Inc.
4 | * Copyright (C) 2001 Sun Microsystems
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 | #ifndef VIEWER_X_H
22 | #define VIEWER_X_H
23 |
24 | #include
25 |
26 | #include
27 | #include
28 |
29 | #include "viewer.h"
30 |
31 |
32 | typedef struct
33 | {
34 | Display *display;
35 | int screen;
36 | } XViewer;
37 |
38 |
39 | extern const PangoViewer x_viewer;
40 |
41 | void x_view_init (gpointer instance,
42 | const PangoViewer *klass);
43 |
44 | gpointer x_view_create (const PangoViewer *klass);
45 |
46 | void x_view_destroy (gpointer instance);
47 |
48 | gpointer x_view_create_surface (gpointer instance,
49 | int width,
50 | int height);
51 |
52 | void x_view_destroy_surface (gpointer instance,
53 | gpointer surface);
54 |
55 | gpointer x_view_create_window (gpointer instance,
56 | const char *title,
57 | int width,
58 | int height);
59 |
60 | void x_view_destroy_window (gpointer instance,
61 | gpointer window);
62 |
63 | gpointer x_view_display (gpointer instance,
64 | gpointer surface,
65 | gpointer window,
66 | int width,
67 | int height,
68 | gpointer state);
69 |
70 | #endif /* VIEWER_X_H */
71 |
--------------------------------------------------------------------------------
/pango/pangoxft-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pangox-private.h:
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGOXFT_PRIVATE_H__
23 | #define __PANGOXFT_PRIVATE_H__
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | G_BEGIN_DECLS
30 |
31 | struct _PangoXftFont
32 | {
33 | PangoFcFont parent_instance;
34 |
35 | XftFont *xft_font; /* created on demand */
36 | PangoFont *mini_font; /* font used to display missing glyphs */
37 |
38 | guint mini_width; /* metrics for missing glyph drawing */
39 | guint mini_height;
40 | guint mini_pad;
41 |
42 | GHashTable *glyph_info; /* Used only when we can't get
43 | * glyph extents out of Xft because
44 | * we have a transformation in effect
45 | */
46 | };
47 |
48 | PangoXftFont *_pango_xft_font_new (PangoXftFontMap *xftfontmap,
49 | FcPattern *pattern);
50 |
51 | void _pango_xft_font_map_get_info (PangoFontMap *fontmap,
52 | Display **display,
53 | int *screen);
54 |
55 | PangoRenderer *_pango_xft_font_map_get_renderer (PangoXftFontMap *xftfontmap);
56 |
57 | PangoFont *_pango_xft_font_get_mini_font (PangoXftFont *xfont);
58 |
59 | G_END_DECLS
60 |
61 | #endif /* __PANGOXFT_PRIVATE_H__ */
62 |
--------------------------------------------------------------------------------
/tests/markups/valid-8.expected:
--------------------------------------------------------------------------------
1 | Text
2 | Text
3 | Text
4 | Text
5 | Text
6 | Text
7 | Text
8 | Text
9 | Text
10 |
11 |
12 | ---
13 |
14 | range 0 4
15 | 0 4 scale 0.578704
16 | 0 4 variant normal
17 | 0 4 stretch ultra-condensed
18 | 0 4 foreground #00000000ffff
19 | 0 4 foreground-alpha 65535
20 | range 4 5
21 | range 5 9
22 | 5 9 scale 0.694444
23 | 5 9 variant small-caps
24 | 5 9 stretch extra-condensed
25 | 5 9 foreground #00000000ffff
26 | 5 9 foreground-alpha 32767
27 | range 9 10
28 | range 10 14
29 | 10 14 scale 0.833333
30 | 10 14 stretch condensed
31 | 10 14 background #00000000ffff
32 | 10 14 background-alpha 1
33 | range 14 15
34 | range 15 19
35 | 15 19 scale 1.000000
36 | 15 19 stretch semi-condensed
37 | 15 19 background #00000000ffff
38 | 15 19 background-alpha 21626
39 | range 19 20
40 | range 20 24
41 | 20 24 scale 1.200000
42 | 20 24 stretch normal
43 | 20 24 background #00000000ffff
44 | 20 24 background-alpha 21626
45 | range 24 25
46 | range 25 29
47 | 25 29 scale 1.440000
48 | 25 29 stretch semi-expanded
49 | 25 29 background #00000000ffff
50 | 25 29 background-alpha 43690
51 | range 29 30
52 | range 30 34
53 | 30 34 scale 1.728000
54 | 30 34 stretch expanded
55 | range 34 35
56 | range 35 39
57 | 35 39 scale 1.728000
58 | 35 39 stretch extra-expanded
59 | range 39 40
60 | range 40 44
61 | 40 44 scale 1.728000
62 | 40 44 stretch ultra-expanded
63 | range 44 2147483647
64 |
65 |
66 | ---
67 |
68 | [0:4] (null) Ultra-Condensed 0
69 | [4:5] (null) Ultra-Condensed 0
70 | [5:9] (null) Extra-Condensed Small-Caps 0
71 | [9:10] (null) Extra-Condensed Small-Caps 0
72 | [10:14] (null) Condensed Small-Caps 0
73 | [14:15] (null) Condensed Small-Caps 0
74 | [15:19] (null) Semi-Condensed Small-Caps 0
75 | [19:20] (null) Semi-Condensed Small-Caps 0
76 | [20:24] (null) Small-Caps 0
77 | [24:25] (null) Small-Caps 0
78 | [25:29] (null) Semi-Expanded Small-Caps 0
79 | [29:30] (null) Semi-Expanded Small-Caps 0
80 | [30:34] (null) Expanded Small-Caps 0
81 | [34:35] (null) Expanded Small-Caps 0
82 | [35:39] (null) Extra-Expanded Small-Caps 0
83 | [39:40] (null) Extra-Expanded Small-Caps 0
84 | [40:44] (null) Ultra-Expanded Small-Caps 0
85 | [44:2147483647] (null) Ultra-Expanded Small-Caps 0
86 |
--------------------------------------------------------------------------------
/tests/testlanguage.c:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * testlanguage.c: Test program for PangoLanguage
3 | *
4 | * Copyright (C) 2021 Matthias Clasen
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #include
23 | #include
24 |
25 | static void
26 | test_language_to_string (void)
27 | {
28 | PangoLanguage *lang;
29 |
30 | lang = pango_language_from_string ("ja-jp");
31 | g_assert_cmpstr (pango_language_to_string (lang), ==, "ja-jp");
32 | g_assert_cmpstr ((pango_language_to_string) (lang), ==, "ja-jp");
33 | }
34 |
35 | static void
36 | test_language_env (void)
37 | {
38 | if (g_test_subprocess ())
39 | {
40 | PangoLanguage **preferred;
41 |
42 | g_setenv ("PANGO_LANGUAGE", "de:ja", TRUE);
43 | g_setenv ("LANGUAGE", "fr", TRUE);
44 |
45 | preferred = pango_language_get_preferred ();
46 | g_assert_nonnull (preferred);
47 | g_assert_true (preferred[0] == pango_language_from_string ("de"));
48 | g_assert_true (preferred[1] == pango_language_from_string ("ja"));
49 | g_assert_null (preferred[2]);
50 |
51 | return;
52 | }
53 |
54 | g_test_trap_subprocess (NULL, 0, 0);
55 | g_test_trap_assert_passed ();
56 | }
57 |
58 | int
59 | main (int argc, char *argv[])
60 | {
61 | g_test_init (&argc, &argv, NULL);
62 |
63 | g_test_add_func ("/language/to-string", test_language_to_string);
64 | g_test_add_func ("/language/language-env", test_language_env);
65 |
66 | return g_test_run ();
67 | }
68 |
--------------------------------------------------------------------------------
/pango.supp:
--------------------------------------------------------------------------------
1 | # Pango
2 | {
3 | pango 1
4 | Memcheck:Leak
5 | match-leak-kinds: definite
6 | fun:realloc
7 | obj:/usr/lib*/libfontconfig.so*
8 | obj:/usr/lib*/libfontconfig.so*
9 | obj:/usr/lib*/libcairo.so*
10 | fun:pango_cairo_fc_font_map_fontset_key_substitute
11 | }
12 |
13 | {
14 | pango 2
15 | Memcheck:Leak
16 | fun:realloc
17 | obj:/usr/lib*/libfontconfig.so*
18 | obj:/usr/lib*/libfontconfig.so*
19 | fun:_cairo_ft_font_options_substitute
20 | }
21 |
22 | {
23 | pango 3
24 | Memcheck:Leak
25 | fun:calloc
26 | ...
27 | fun:pango_language_from_string
28 | }
29 |
30 | # Fontconfig
31 | {
32 | FcFontSetList
33 | Memcheck:Leak
34 | match-leak-kinds: definite
35 | fun:malloc
36 | obj:/usr/lib*/libfontconfig.so*
37 | obj:/usr/lib*/libfontconfig.so*
38 | fun:FcFontSetList
39 | }
40 |
41 | {
42 | FcPatternObjectInsertElt
43 | Memcheck:Leak
44 | match-leak-kinds: definite
45 | fun:malloc
46 | fun:FcPatternObjectInsertElt
47 | }
48 |
49 | {
50 | FcFontRenderPrepare
51 | Memcheck:Leak
52 | match-leak-kinds: definite
53 | fun:realloc
54 | obj:/usr/lib*/libfontconfig.so*
55 | obj:/usr/lib*/libfontconfig.so*
56 | fun:FcFontRenderPrepare
57 | }
58 |
59 | {
60 | FcDefaultSubstitute
61 | Memcheck:Leak
62 | match-leak-kinds: definite
63 | fun:realloc
64 | obj:/usr/lib*/libfontconfig.so*
65 | obj:/usr/lib*/libfontconfig.so*
66 | fun:FcDefaultSubstitute
67 | }
68 |
69 | # Pixman
70 | {
71 | pixman_image_composite32
72 | Memcheck:Cond
73 | obj:/usr/lib*/libpixman-1.so*
74 | obj:/usr/lib*/libpixman-1.so*
75 | fun:pixman_image_composite32
76 | }
77 |
78 | # GLib
79 | {
80 | glib GQuark
81 | Memcheck:Leak
82 | match-leak-kinds: definite
83 | fun:malloc
84 | ...
85 | fun:g_quark_*
86 | }
87 | {
88 | glib GQuark
89 | Memcheck:Leak
90 | match-leak-kinds: definite
91 | fun:malloc
92 | ...
93 | fun:g_intern_static_string
94 | }
95 | {
96 | glib GThread
97 | Memcheck:Leak
98 | fun:calloc
99 | ...
100 | fun:g_thread_new_internal
101 | }
102 |
103 | # libthai
104 | {
105 | libthai ThBrk
106 | Memcheck:Leak
107 | match-leak-kinds: definite
108 | fun:malloc
109 | ...
110 | fun:th_brk_new
111 | }
112 |
--------------------------------------------------------------------------------
/tests/test-harfbuzz.c:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * test-harfbuzz.c: Test Pango harfbuzz apis
3 | *
4 | * Copyright (C) 2019 Red Hat, Inc.
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #include
23 | #include
24 | #include "test-common.h"
25 |
26 | /* Some basic checks that the hb_font_t returned
27 | * by pango_font_get_hb_font is functional
28 | */
29 | static void
30 | test_hb_font (void)
31 | {
32 | PangoFontMap *fontmap;
33 | PangoContext *context;
34 | PangoFontDescription *desc;
35 | PangoFont *font;
36 | hb_font_t *hb_font;
37 | hb_bool_t res;
38 | hb_codepoint_t glyph;
39 |
40 | fontmap = pango_cairo_font_map_new ();
41 | context = pango_font_map_create_context (fontmap);
42 |
43 | if (strcmp (G_OBJECT_TYPE_NAME (fontmap), "PangoCairoWin32FontMap") == 0)
44 | desc = pango_font_description_from_string ("Verdana 11");
45 | else
46 | desc = pango_font_description_from_string ("Cantarell 11");
47 | font = pango_context_load_font (context, desc);
48 | hb_font = pango_font_get_hb_font (font);
49 |
50 | g_assert_nonnull (hb_font);
51 |
52 | res = hb_font_get_nominal_glyph (hb_font, 0x20, &glyph);
53 |
54 | g_assert_true (res);
55 | g_assert_cmpint (glyph, !=, 0);
56 |
57 | g_object_unref (font);
58 | pango_font_description_free (desc);
59 | g_object_unref (context);
60 | g_object_unref (fontmap);
61 | }
62 |
63 | int
64 | main (int argc, char *argv[])
65 | {
66 | g_test_init (&argc, &argv, NULL);
67 |
68 | g_test_add_func ("/harfbuzz/font", test_hb_font);
69 |
70 | return g_test_run ();
71 | }
72 |
--------------------------------------------------------------------------------
/pango/pango-markup.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-markup.h: Parser for attributed text
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_MARKUP_H__
23 | #define __PANGO_MARKUP_H__
24 |
25 | #include
26 |
27 | G_BEGIN_DECLS
28 |
29 |
30 | PANGO_AVAILABLE_IN_1_32
31 | GMarkupParseContext * pango_markup_parser_new (gunichar accel_marker);
32 |
33 | PANGO_AVAILABLE_IN_1_32
34 | gboolean pango_markup_parser_finish (GMarkupParseContext *context,
35 | PangoAttrList **attr_list,
36 | char **text,
37 | gunichar *accel_char,
38 | GError **error);
39 |
40 | PANGO_AVAILABLE_IN_ALL
41 | gboolean pango_parse_markup (const char *markup_text,
42 | int length,
43 | gunichar accel_marker,
44 | PangoAttrList **attr_list,
45 | char **text,
46 | gunichar *accel_char,
47 | GError **error);
48 |
49 |
50 | G_END_DECLS
51 |
52 | #endif /* __PANGO_MARKUP_H__ */
53 |
--------------------------------------------------------------------------------
/pango/pango-color.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-color.h: A color struct
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_COLOR_H__
23 | #define __PANGO_COLOR_H__
24 |
25 | #include
26 | #include
27 |
28 | G_BEGIN_DECLS
29 |
30 |
31 | typedef struct _PangoColor PangoColor;
32 |
33 | /**
34 | * PangoColor:
35 | * @red: value of red component
36 | * @green: value of green component
37 | * @blue: value of blue component
38 | *
39 | * The `PangoColor` structure is used to
40 | * represent a color in an uncalibrated RGB color-space.
41 | */
42 | struct _PangoColor
43 | {
44 | guint16 red;
45 | guint16 green;
46 | guint16 blue;
47 | };
48 |
49 | #define PANGO_TYPE_COLOR (pango_color_get_type ())
50 |
51 | PANGO_AVAILABLE_IN_ALL
52 | GType pango_color_get_type (void) G_GNUC_CONST;
53 |
54 | PANGO_AVAILABLE_IN_ALL
55 | PangoColor *pango_color_copy (const PangoColor *src);
56 |
57 | PANGO_AVAILABLE_IN_ALL
58 | void pango_color_free (PangoColor *color);
59 |
60 | PANGO_AVAILABLE_IN_ALL
61 | gboolean pango_color_parse (PangoColor *color,
62 | const char *spec);
63 |
64 | PANGO_AVAILABLE_IN_1_46
65 | gboolean pango_color_parse_with_alpha (PangoColor *color,
66 | guint16 *alpha,
67 | const char *spec);
68 |
69 | PANGO_AVAILABLE_IN_1_16
70 | char *pango_color_to_string (const PangoColor *color);
71 |
72 |
73 | G_END_DECLS
74 |
75 | #endif /* __PANGO_COLOR_H__ */
76 |
--------------------------------------------------------------------------------
/pango/pango-engine.c:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-engine.c: Engines for script and language specific processing
3 | *
4 | * Copyright (C) 2003 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #include "config.h"
23 |
24 | #include "pango-engine.h"
25 | #include "pango-impl-utils.h"
26 |
27 |
28 | G_DEFINE_ABSTRACT_TYPE (PangoEngine, pango_engine, G_TYPE_OBJECT);
29 |
30 | static void
31 | pango_engine_init (PangoEngine *self)
32 | {
33 | }
34 |
35 | static void
36 | pango_engine_class_init (PangoEngineClass *klass)
37 | {
38 | }
39 |
40 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS
41 | G_DEFINE_ABSTRACT_TYPE (PangoEngineLang, pango_engine_lang, PANGO_TYPE_ENGINE);
42 | G_GNUC_END_IGNORE_DEPRECATIONS
43 |
44 | static void
45 | pango_engine_lang_init (PangoEngineLang *self)
46 | {
47 | }
48 |
49 | static void
50 | pango_engine_lang_class_init (PangoEngineLangClass *klass)
51 | {
52 | }
53 |
54 |
55 | static PangoCoverageLevel
56 | pango_engine_shape_real_covers (PangoEngineShape *engine G_GNUC_UNUSED,
57 | PangoFont *font,
58 | PangoLanguage *language,
59 | gunichar wc)
60 | {
61 | PangoCoverage *coverage = pango_font_get_coverage (font, language);
62 | PangoCoverageLevel result = pango_coverage_get (coverage, wc);
63 |
64 | g_object_unref (coverage);
65 |
66 | return result;
67 | }
68 |
69 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS
70 | G_DEFINE_ABSTRACT_TYPE (PangoEngineShape, pango_engine_shape, PANGO_TYPE_ENGINE);
71 | G_GNUC_END_IGNORE_DEPRECATIONS
72 |
73 | static void
74 | pango_engine_shape_init (PangoEngineShape *klass)
75 | {
76 | }
77 |
78 | static void
79 | pango_engine_shape_class_init (PangoEngineShapeClass *class)
80 | {
81 | class->covers = pango_engine_shape_real_covers;
82 | }
83 |
--------------------------------------------------------------------------------
/tests/layouts/arabic-format.layout:
--------------------------------------------------------------------------------
1 | {
2 | "context" : {
3 | "font" : "serif 12",
4 | "base-gravity" : "south",
5 | "gravity-hint" : "natural",
6 | "base-dir" : "weak-ltr",
7 | "round-glyph-positions" : true,
8 | "transform" : [
9 | 1,
10 | 0,
11 | 0,
12 | 1,
13 | 0,
14 | 0
15 | ]
16 | },
17 | "comment" : "Test that font fallback works\nfor visible format characters\nin the Arabic block.",
18 | "text" : "",
19 | "font" : "Sans 32",
20 | "output" : {
21 | "is-wrapped" : false,
22 | "is-ellipsized" : false,
23 | "unknown-glyphs" : 0,
24 | "width" : 56320,
25 | "height" : 77824,
26 | "log-attrs" : [
27 | {
28 | "char-break" : true,
29 | "cursor-position" : true,
30 | "sentence-boundary" : true,
31 | "backspace-deletes-character" : true,
32 | "word-boundary" : true
33 | },
34 | {
35 | "line-break" : true,
36 | "mandatory-break" : true,
37 | "char-break" : true,
38 | "white" : true,
39 | "cursor-position" : true,
40 | "sentence-boundary" : true,
41 | "backspace-deletes-character" : true,
42 | "word-boundary" : true
43 | }
44 | ],
45 | "lines" : [
46 | {
47 | "start-index" : 0,
48 | "length" : 2,
49 | "paragraph-start" : true,
50 | "direction" : "ltr",
51 | "runs" : [
52 | {
53 | "offset" : 0,
54 | "length" : 2,
55 | "text" : "",
56 | "bidi-level" : 2,
57 | "gravity" : "south",
58 | "language" : "en-us",
59 | "script" : "common",
60 | "font" : {
61 | "description" : "Amiri 32",
62 | "checksum" : "d5e6374130d6df09e66f80f0bbcb7262112584ebadb861f0a412a21cc742a5dd",
63 | "matrix" : [
64 | 1,
65 | -0,
66 | -0,
67 | 1,
68 | 0,
69 | 0
70 | ]
71 | },
72 | "flags" : 0,
73 | "y-offset" : 0,
74 | "start-x-offset" : 0,
75 | "end-x-offset" : 0,
76 | "glyphs" : [
77 | {
78 | "glyph" : 1,
79 | "width" : 56320,
80 | "is-cluster-start" : true,
81 | "log-cluster" : 0
82 | }
83 | ]
84 | }
85 | ]
86 | }
87 | ]
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/pango/pango-fontset-simple.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-fontset-simple.h: Font set handling
3 | *
4 | * Copyright (C) 2001 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_FONTSET_SIMPLE_H__
23 | #define __PANGO_FONTSET_SIMPLE_H__
24 |
25 | #include
26 | #include
27 | #include
28 |
29 | #include
30 |
31 | G_BEGIN_DECLS
32 |
33 | /**
34 | * PangoFontsetSimple:
35 | *
36 | * `PangoFontsetSimple` is a implementation of the abstract
37 | * `PangoFontset` base class as an array of fonts.
38 | *
39 | * When creating a `PangoFontsetSimple`, you have to provide
40 | * the array of fonts that make up the fontset.
41 | */
42 | #define PANGO_TYPE_FONTSET_SIMPLE (pango_fontset_simple_get_type ())
43 | #define PANGO_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FONTSET_SIMPLE, PangoFontsetSimple))
44 | #define PANGO_IS_FONTSET_SIMPLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FONTSET_SIMPLE))
45 |
46 | typedef struct _PangoFontsetSimple PangoFontsetSimple;
47 | typedef struct _PangoFontsetSimpleClass PangoFontsetSimpleClass;
48 |
49 |
50 | PANGO_AVAILABLE_IN_ALL
51 | GType pango_fontset_simple_get_type (void) G_GNUC_CONST;
52 |
53 | PANGO_AVAILABLE_IN_ALL
54 | PangoFontsetSimple * pango_fontset_simple_new (PangoLanguage *language);
55 | PANGO_AVAILABLE_IN_ALL
56 | void pango_fontset_simple_append (PangoFontsetSimple *fontset,
57 | PangoFont *font);
58 | PANGO_AVAILABLE_IN_ALL
59 | int pango_fontset_simple_size (PangoFontsetSimple *fontset);
60 |
61 |
62 | G_END_DECLS
63 |
64 | #endif /* __PANGO_FONTSET_SIMPLE_H__ */
65 |
--------------------------------------------------------------------------------
/pango/pango-coverage-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-coverage-private.h: Coverage sets for fonts
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_COVERAGE_PRIVATE_H__
23 | #define __PANGO_COVERAGE_PRIVATE_H__
24 |
25 | #include
26 | #include
27 |
28 | G_BEGIN_DECLS
29 |
30 | #define PANGO_TYPE_COVERAGE (pango_coverage_get_type ())
31 | #define PANGO_COVERAGE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_COVERAGE, PangoCoverage))
32 | #define PANGO_IS_COVERAGE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_COVERAGE))
33 | #define PANGO_COVERAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_COVERAGE, PangoCoverageClass))
34 | #define PANGO_IS_COVERAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_COVERAGE))
35 | #define PANGO_COVERAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_COVERAGE, PangoCoverageClass))
36 |
37 | typedef struct _PangoCoverageClass PangoCoverageClass;
38 | typedef struct _PangoCoveragePrivate PangoCoveragePrivate;
39 |
40 | struct _PangoCoverage
41 | {
42 | GObject parent_instance;
43 |
44 | hb_set_t *chars;
45 | hb_set_t *nonchars;
46 | };
47 |
48 | struct _PangoCoverageClass
49 | {
50 | GObjectClass parent_class;
51 |
52 | PangoCoverageLevel (* get) (PangoCoverage *coverage,
53 | int index);
54 | void (* set) (PangoCoverage *coverage,
55 | int index,
56 | PangoCoverageLevel level);
57 | PangoCoverage * (* copy) (PangoCoverage *coverage);
58 | };
59 |
60 | G_END_DECLS
61 |
62 | #endif /* __PANGO_COVERAGE_PRIVATE_H__ */
63 |
--------------------------------------------------------------------------------
/pango/pango-utils-private.h:
--------------------------------------------------------------------------------
1 | /* Pango
2 | * pango-utils.c: Utilities for internal functions and modules
3 | *
4 | * Copyright (C) 2000 Red Hat Software
5 | *
6 | * This library is free software; you can redistribute it and/or
7 | * modify it under the terms of the GNU Library General Public
8 | * License as published by the Free Software Foundation; either
9 | * version 2 of the License, or (at your option) any later version.
10 | *
11 | * This library is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 | * Library General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU Library General Public
17 | * License along with this library; if not, write to the
18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 | * Boston, MA 02111-1307, USA.
20 | */
21 |
22 | #ifndef __PANGO_UTILS_PRIVATE_H__
23 | #define __PANGO_UTILS_PRIVATE_H__
24 |
25 | #include
26 | #include
27 | #include
28 | #include
29 |
30 | G_BEGIN_DECLS
31 |
32 | PANGO_DEPRECATED_IN_1_38
33 | char * pango_config_key_get_system (const char *key);
34 | PANGO_DEPRECATED_IN_1_38
35 | char * pango_config_key_get (const char *key);
36 | PANGO_DEPRECATED_IN_1_32
37 | void pango_lookup_aliases (const char *fontname,
38 | char ***families,
39 | int *n_families);
40 |
41 | /* On Unix, return the name of the "pango" subdirectory of SYSCONFDIR
42 | * (which is set at compile time). On Win32, return the Pango
43 | * installation directory (which is set at installation time, and
44 | * stored in the registry). The returned string should not be
45 | * g_free'd.
46 | */
47 | PANGO_DEPRECATED
48 | const char * pango_get_sysconf_subdirectory (void) G_GNUC_PURE;
49 |
50 | /* Ditto for LIBDIR/pango. On Win32, use the same Pango
51 | * installation directory. This returned string should not be
52 | * g_free'd either.
53 | */
54 | PANGO_DEPRECATED
55 | const char * pango_get_lib_subdirectory (void) G_GNUC_PURE;
56 |
57 | void pango_log2vis_fill_embedding_levels (const char *text,
58 | int length,
59 | unsigned int n_chars,
60 | guint8 *embedding_levels,
61 | PangoDirection *pbase_dir);
62 |
63 |
64 | G_END_DECLS
65 |
66 | #endif /* __PANGO_UTILS_PRIATE_H__ */
67 |
--------------------------------------------------------------------------------