Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fcft for openSUSE:Factory checked in at 2021-07-18 23:45:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fcft (Old) and /work/SRC/openSUSE:Factory/.fcft.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fcft" Sun Jul 18 23:45:07 2021 rev:4 rq:906958 version:2.4.3 Changes: -------- --- /work/SRC/openSUSE:Factory/fcft/fcft.changes 2021-07-08 22:49:24.952007486 +0200 +++ /work/SRC/openSUSE:Factory/.fcft.new.2632/fcft.changes 2021-07-18 23:45:20.358865969 +0200 @@ -1,0 +2,10 @@ +Sun Jul 18 16:55:32 UTC 2021 - Arnav Singh <[email protected]> + +- Update to 2.4.3: + * Fixed bitmap/aliased font glyphs being mirrored on + big-endian architectures. + * Fixed color font glyphs having wrong colors on big-endian architectures. + * Fixed crash when destroying a font that failed to load + (typically happens when there are no fonts available at all). + +------------------------------------------------------------------- Old: ---- fcft-2.4.2.tar.gz New: ---- fcft-2.4.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fcft.spec ++++++ --- /var/tmp/diff_new_pack.pUuoX1/_old 2021-07-18 23:45:20.866862061 +0200 +++ /var/tmp/diff_new_pack.pUuoX1/_new 2021-07-18 23:45:20.870862030 +0200 @@ -18,7 +18,7 @@ %define libname libfcft3 Name: fcft -Version: 2.4.2 +Version: 2.4.3 Release: 0 Summary: A library for font loading and glyph rasterization using FreeType/pixman License: MIT ++++++ fcft-2.4.2.tar.gz -> fcft-2.4.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/CHANGELOG.md new/fcft/CHANGELOG.md --- old/fcft/CHANGELOG.md 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/CHANGELOG.md 2021-07-18 17:37:46.000000000 +0200 @@ -1,5 +1,6 @@ # Changelog +* [2.4.3](#2-4-3) * [2.4.2](#2-4-2) * [2.4.1](#2-4-1) * [2.4.0](#2-4-0) @@ -23,6 +24,17 @@ * [1.1.7](#1-1-7) +## 2.4.3 + +### Fixed + +* Bitmap/aliased font glyphs being mirrored on big-endian + architectures. +* Color font glyphs having wrong colors on big-endian architectures. +* Crash when destroying a font that failed to load (typically happens + when there are no fonts available at all). + + ## 2.4.2 ### Fixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/PKGBUILD new/fcft/PKGBUILD --- old/fcft/PKGBUILD 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/PKGBUILD 2021-07-18 17:37:46.000000000 +0200 @@ -1,5 +1,5 @@ pkgname=fcft -pkgver=2.4.2 +pkgver=2.4.3 pkgrel=1 pkgdesc="Simple font loading and glyph rasterization library" changelog=CHANGELOG.md diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_capabilities.3.scd new/fcft/doc/fcft_capabilities.3.scd --- old/fcft/doc/fcft_capabilities.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_capabilities.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -18,7 +18,7 @@ ``` enum fcft_capabilities { FCFT_CAPABILITY_GRAPHEME_SHAPING = 0x1, /* Since 2.3.0 */ - FCFT_CAPABILITY_TEXT_RUN_SHAPING = 0x2, /* Since 2.4.2 */ + FCFT_CAPABILITY_TEXT_RUN_SHAPING = 0x2, /* Since 2.4.3 */ }; ``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_clone.3.scd new/fcft/doc/fcft_clone.3.scd --- old/fcft/doc/fcft_clone.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_clone.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_clone(3) "2.4.2" "fcft" +fcft_clone(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_destroy.3.scd new/fcft/doc/fcft_destroy.3.scd --- old/fcft/doc/fcft_destroy.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_destroy.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_destroy(3) "2.4.2" "fcft" +fcft_destroy(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_from_name.3.scd new/fcft/doc/fcft_from_name.3.scd --- old/fcft/doc/fcft_from_name.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_from_name.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_from_name(3) "2.4.2" "fcft" +fcft_from_name(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_glyph_rasterize.3.scd new/fcft/doc/fcft_glyph_rasterize.3.scd --- old/fcft/doc/fcft_glyph_rasterize.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_glyph_rasterize.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_glyph_rasterize(3) "2.4.2" "fcft" +fcft_glyph_rasterize(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_grapheme_rasterize.3.scd new/fcft/doc/fcft_grapheme_rasterize.3.scd --- old/fcft/doc/fcft_grapheme_rasterize.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_grapheme_rasterize.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_grapheme_rasterize(3) "2.4.2" "fcft" +fcft_grapheme_rasterize(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_kerning.3.scd new/fcft/doc/fcft_kerning.3.scd --- old/fcft/doc/fcft_kerning.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_kerning.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_kerning(3) "2.4.2" "fcft" +fcft_kerning(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_log_init.3.scd new/fcft/doc/fcft_log_init.3.scd --- old/fcft/doc/fcft_log_init.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_log_init.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_log_init(3) "2.4.2" "fcft" +fcft_log_init(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_precompose.3.scd new/fcft/doc/fcft_precompose.3.scd --- old/fcft/doc/fcft_precompose.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_precompose.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_precompose(3) "2.4.2" "fcft" +fcft_precompose(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_set_scaling_filter.3.scd new/fcft/doc/fcft_set_scaling_filter.3.scd --- old/fcft/doc/fcft_set_scaling_filter.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_set_scaling_filter.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_set_scaling_filter(3) "2.4.2" "fcft" +fcft_set_scaling_filter(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_size_adjust.3.scd new/fcft/doc/fcft_size_adjust.3.scd --- old/fcft/doc/fcft_size_adjust.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_size_adjust.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_size_adjust(3) "2.4.2" "fcft" +fcft_size_adjust(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_text_run_destroy.3.scd new/fcft/doc/fcft_text_run_destroy.3.scd --- old/fcft/doc/fcft_text_run_destroy.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_text_run_destroy.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_text_run_destroy(3) "2.4.2" "fcft" +fcft_text_run_destroy(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/doc/fcft_text_run_rasterize.3.scd new/fcft/doc/fcft_text_run_rasterize.3.scd --- old/fcft/doc/fcft_text_run_rasterize.3.scd 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/doc/fcft_text_run_rasterize.3.scd 2021-07-18 17:37:46.000000000 +0200 @@ -1,4 +1,4 @@ -fcft_text_run_rasterize(3) "2.4.2" "fcft" +fcft_text_run_rasterize(3) "2.4.3" "fcft" # NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/fcft.c new/fcft/fcft.c --- old/fcft/fcft.c 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/fcft.c 2021-07-18 17:37:46.000000000 +0200 @@ -227,7 +227,8 @@ while (tll_length(font_cache) > 0) { if (tll_front(font_cache).font == NULL) tll_pop_front(font_cache); - fcft_destroy(&tll_front(font_cache).font->public); + else + fcft_destroy(&tll_front(font_cache).font->public); } assert(tll_length(font_cache) == 0); @@ -1331,20 +1332,34 @@ /* Convert FT bitmap to pixman image */ switch (bitmap->pixel_mode) { - case FT_PIXEL_MODE_MONO: + case FT_PIXEL_MODE_MONO: /* PIXMAN_a1 */ + /* + * FreeType: left-most pixel is stored in MSB ABCDEFGH IJKLMNOP + * Pixman: LE: left-most pixel in LSB HGFEDCBA PONMLKJI + * BE: left-most pixel in MSB ABCDEFGH IJKLMNOP + * + * Thus, we need to reverse each byte on little-endian systems. + */ for (size_t r = 0; r < bitmap->rows; r++) { for (size_t c = 0; c < (bitmap->width + 7) / 8; c++) { uint8_t v = bitmap->buffer[r * bitmap->pitch + c]; +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ uint8_t reversed = 0; for (size_t i = 0; i < min(8, bitmap->width - c * 8); i++) reversed |= ((v >> (7 - i)) & 1) << i; data[r * stride + c] = reversed; +#else + data[r * stride + c] = v; +#endif } } break; - case FT_PIXEL_MODE_GRAY: + case FT_PIXEL_MODE_GRAY: /* PIXMAN_a8 */ + /* + * One pixel, one byte. No endianness to worry about + */ if (stride == bitmap->pitch) { if (bitmap->buffer != NULL) memcpy(data, bitmap->buffer, rows * stride); @@ -1356,13 +1371,39 @@ } break; - case FT_PIXEL_MODE_BGRA: + case FT_PIXEL_MODE_BGRA: /* PIXMAN_a8r8g8b8 */ + /* + * FreeType: blue comes *first* in memory + * Pixman: LE: blue comes *first* in memory + * BE: alpha comes *first* in memory + * + * Pixman is ARGB *when loaded into a register*, assuming + * machine native 32-bit loads. Thus, it???s in-memory layout + * depends on the host???s endianness. + */ assert(stride == bitmap->pitch); - if (bitmap->buffer != NULL) - memcpy(data, bitmap->buffer, bitmap->rows * bitmap->pitch); + for (size_t r = 0; r < bitmap->rows; r++) { + for (size_t c = 0; c < bitmap->width * 4; c += 4) { + unsigned char _b = bitmap->buffer[r * bitmap->pitch + c + 0]; + unsigned char _g = bitmap->buffer[r * bitmap->pitch + c + 1]; + unsigned char _r = bitmap->buffer[r * bitmap->pitch + c + 2]; + unsigned char _a = bitmap->buffer[r * bitmap->pitch + c + 3]; + + uint32_t *p = (uint32_t *)&data[r * stride + c]; + *p = (uint32_t)_a << 24 | _r << 16 | _g << 8 | _b; + } + } break; - case FT_PIXEL_MODE_LCD: + case FT_PIXEL_MODE_LCD: /* PIXMAN_x8r8g8b8 */ + /* + * FreeType: red comes *first* in memory + * Pixman: LE: blue comes *first* in memory + * BE: x comes *first* in memory + * + * Same as above, except that the FreeType data is now RGBx + * instead of BGRA. + */ for (size_t r = 0; r < bitmap->rows; r++) { for (size_t c = 0; c < bitmap->width; c += 3) { unsigned char _r = bitmap->buffer[r * bitmap->pitch + c + (bgr ? 2 : 0)]; @@ -1375,7 +1416,15 @@ } break; - case FT_PIXEL_MODE_LCD_V: + case FT_PIXEL_MODE_LCD_V: /* PIXMAN_x8r8g8b8 */ + /* + * FreeType: red comes *first* in memory + * Pixman: LE: blue comes *first* in memory + * BE: x comes *first* in memory + * + * Same as above, except that the FreeType data is now RGBx + * instead of BGRA. + */ for (size_t r = 0; r < bitmap->rows; r += 3) { for (size_t c = 0; c < bitmap->width; c++) { unsigned char _r = bitmap->buffer[(r + (bgr ? 2 : 0)) * bitmap->pitch + c]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fcft/meson.build new/fcft/meson.build --- old/fcft/meson.build 2021-07-07 19:39:44.000000000 +0200 +++ new/fcft/meson.build 2021-07-18 17:37:46.000000000 +0200 @@ -1,5 +1,5 @@ project('fcft', 'c', - version: '2.4.2', # Don't forget to update version in man pages + version: '2.4.3', # Don't forget to update version in man pages license: 'MIT', meson_version: '>=0.54.0', default_options: [ @@ -20,7 +20,7 @@ so_version = [ '3', # MAJOR: increment on non-backward compatible ABI changes '4', # MINOR: increment with backward compatible ABI changes - '2', # PATCH: increment with non-ABI affecting changes + '3', # PATCH: increment with non-ABI affecting changes ] is_debug_build = get_option('buildtype').startswith('debug')
