summaryrefslogtreecommitdiff
path: root/tests/test-font.c
Commit message (Collapse)AuthorAgeFilesLines
* Add a faceid field to font descriptionsMatthias Clasen2022-01-281-13/+63
| | | | | | | | | | The faceid will be used in future commits to improve font -> description -> font roundtrip accuracy. Update affected tests. Minimal test included.
* Add some useful face apiMatthias Clasen2022-01-281-0/+37
| | | | | | | | Add pango_font_face_supports_language and pango_font_face_get_languages. There is no particular reason to tie language information to fonts instead of faces. This will be useful for the font chooser. Update the fontconfig implementation for these changes.
* font: Add pango_font_face_is_variable/monospaceMatthias Clasen2022-01-281-3/+10
| | | | | | | | | | These are really properties of the individual faces, not the family. The default implementations of these functions simply return the corresponding family value. Add some tests for the new api.
* font: Avoid cosmetic uglinessMatthias Clasen2021-11-271-2/+29
| | | | | | | | When setting variations to "", font descriptions would add an ugly useless " @" at the end of their serialization. Avoid that. Test included.
* Add variant roundtrip testsMatthias Clasen2021-11-071-4/+42
| | | | | | Test some more tests for roundtripping casing variants from font description to font and back.
* Add a test for small capsMatthias Clasen2021-11-051-0/+41
| | | | | | | Add a test that verifies that PANGO_VARIANT_SMALL_CAPS survives a roundtrip from font description to font and back, and that it shows up in the font as smcp=1 in the OpenType features.
* tests: Test font roundtrips on MacOscoretext-font-describeMatthias Clasen2021-08-311-12/+5
| | | | | | We were skipping the test that would have found the brokenness in the previous fix. Lets see if we can get the test working on MacOs.
* tests: Silence compiler warningsMatthias Clasen2021-08-221-1/+1
|
* tests: Locale handling fixesMatthias Clasen2021-07-211-1/+0
| | | | | The return value of setlocale is only good until the next call. Also, consistently use en_US.UTF-8.
* tests: Add more font testsMatthias Clasen2021-07-061-8/+90
|
* tests: Free the sizes array, if it was allocatedJan Alexander Steffens (heftig)2021-07-021-0/+1
|
* tests: Be more careful about font formatsbitmap-font-testsMatthias Clasen2021-06-301-3/+1
| | | | | | | It turns out that we can still see non-scalable fonts which report a list of sizes. Take that into account. Fixes: #570
* Add some more font api testsMatthias Clasen2021-06-281-0/+71
| | | | Exercise the list model apis, for coverage.
* tests: Add tests for pango_font_describefix-font-roundtripMatthias Clasen2021-01-241-1/+70
| | | | | | | | | Test that round-tripping through pango_font_describe works. This is currently broken for scalable bitmap fonts, such as color Emoji fonts. We skip the test on OS X where we are most likely missing the fonts.
* tests: Fix an errant unrefMatthias Clasen2021-01-241-1/+0
| | | | pango_cairo_font_map_get_default is transfer none.
* tests: Don't assert too muchfont-face-fixesMatthias Clasen2021-01-231-1/+1
| | | | | | | | | | We can't guarantee uniqueness of face names, so we don't know that getting a face by name will return the same face we got the name from (which is true if faces are unique). So, just assert that we get a face with the same name. Fixes: #494
* Fix leaks found by asanSzunti2021-01-161-1/+4
|
* tests: Use the appropriate GTest APIEmmanuele Bassi2020-04-141-19/+15
| | | | | | | | Do not use homegrown assertion and failure macros, when GTest has perfectly functional API to deal with all the cases Pango covers. Using GTest also allows us to rely on appropriate formatting for results and logging.
* Add a test for new font apiMatthias Clasen2019-10-311-0/+62
| | | | This test exercises the new font enumeration apis.
* Add a test for extentsMatthias Clasen2019-08-121-0/+30
| | | | | We want to make sure that the ink rectangles we return have positive size.
* Fix the buildMatthias Clasen2019-07-161-1/+1
|
* ci: Use an existing fontMatthias Clasen2019-07-161-2/+7
| | | | | We don't care about the particular font here, we just want to list font metrics of an existing font.
* Add a test that prints out font metricsMatthias Clasen2019-07-161-1/+44
| | | | | This is to confirm whether fonts report a nonzero height on Windows.
* Add some font description testsMatthias Clasen2018-01-031-0/+38
| | | | This adds some tests around the new variations field.
* Add some tests for PangoFontDescriptionMatthias Clasen2014-09-081-0/+92
This just a small beginning, much more is needed here.