Hello community, here is the log from the commit of package font-specimen for openSUSE:Factory checked in at 2014-11-15 11:41:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/font-specimen (Old) and /work/SRC/openSUSE:Factory/.font-specimen.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "font-specimen" Changes: -------- --- /work/SRC/openSUSE:Factory/font-specimen/font-specimen.changes 2014-11-14 09:18:49.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.font-specimen.new/font-specimen.changes 2014-11-15 12:15:13.000000000 +0100 @@ -1,0 +2,7 @@ +Thu Nov 13 11:41:58 UTC 2014 - [email protected] + +- update to 20141113 + * monochrome fonts: black absorbs gray color + on the pixel, not vice versa + +------------------------------------------------------------------- Old: ---- font-specimen-20140711.tar.bz2 New: ---- font-specimen-20141113.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ font-specimen.spec ++++++ --- /var/tmp/diff_new_pack.kYdfHV/_old 2014-11-15 12:15:15.000000000 +0100 +++ /var/tmp/diff_new_pack.kYdfHV/_new 2014-11-15 12:15:15.000000000 +0100 @@ -18,7 +18,7 @@ %define libmaj 0 Name: font-specimen -Version: 20140711 +Version: 20141113 Release: 0 Summary: Font Specimen Creator License: GPL-2.0+ @@ -48,7 +48,10 @@ %package devel Summary: Development Files for libspecimen%{libmaj} Group: Development/Libraries/C and C++ +Requires: freetype-devel +Requires: harfbuzz-devel Requires: libfont-specimen%{libmaj} = %{version} +Requires: libpng-devel %description devel Header and development files for font-specimen library. ++++++ font-specimen-20140711.tar.bz2 -> font-specimen-20141113.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/ChangeLog new/font-specimen-20141113/ChangeLog --- old/font-specimen-20140711/ChangeLog 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/ChangeLog 2014-11-13 12:41:05.000000000 +0100 @@ -1 +1,3 @@ +2014-11-13 monochrome fonts: black absorbs gray color + on the pixel, not vice versa 2014-07-11 font-specimen library created diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/Makefile new/font-specimen-20141113/Makefile --- old/font-specimen-20140711/Makefile 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/Makefile 2014-11-13 12:41:05.000000000 +0100 @@ -19,7 +19,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -VERSION = 20140711 +VERSION = 20141113 LIBRARY_NAME = font-specimen LIBRARY_MAJOR = 0 LIBRARY_VERSION = 0.0.0 @@ -40,9 +40,9 @@ UNICODE_SOURCES = blocks-map.txt blocks.sh blocks.txt Blocks.txt Scripts.txt sentences.txt SOURCES UnicodeData.txt unicode.txt UNICODE_SCRIPTS = collections-map.sh collections.sh scripts-map.sh scripts.sh unicode.sh -font-specimen: font-specimen.c $(LIBRARY_FILE) +font-specimen: font-specimen.c .libs/$(LIBRARY_FILE) gcc -L.libs $(MYCFLAGS) $(CFLAGS) $(MYLDFLAGS) $(LDLAGS) -o font-specimen font-specimen.c -l$(LIBRARY_NAME) -$(LIBRARY_FILE): $(OBJS) +.libs/$(LIBRARY_FILE): $(OBJS) mkdir -p .libs gcc $(MYCFLAGS) $(CFLAGS) -shared -Wl,-soname,${LIBRARY_LINK}.$(LIBRARY_MAJOR) -o .libs/$(LIBRARY_FILE) $(OBJS) $(MYLIBS) ln -sf $(LIBRARY_FILE) .libs/$(LIBRARY_LINK) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/error.c new/font-specimen-20141113/error.c --- old/font-specimen-20140711/error.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/error.c 2014-11-13 12:41:05.000000000 +0100 @@ -4,7 +4,12 @@ int debug = 0; -void error(const char *string) +void set_debug(int on) +{ + debug = on; +} + +void font_specimen_error(const char *string) { if (debug) fprintf(stderr, "%s\n", string); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/error.h new/font-specimen-20141113/error.h --- old/font-specimen-20140711/error.h 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/error.h 2014-11-13 12:41:05.000000000 +0100 @@ -20,6 +20,5 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -extern int debug; - -void error(const char *string); +void set_debug(int on); +void font_specimen_error(const char *string); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/fc.c new/font-specimen-20141113/fc.c --- old/font-specimen-20140711/fc.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/fc.c 2014-11-13 12:41:05.000000000 +0100 @@ -57,13 +57,13 @@ if (! (p = FcPatternDuplicate(pattern))) { - error("fontconfig: out of memory"); + font_specimen_error("fontconfig: out of memory"); return NULL; } if (!FcConfigSubstitute(NULL, p, FcMatchPattern)) { - error("fontconfig: out of memory"); + font_specimen_error("fontconfig: out of memory"); return NULL; } FcDefaultSubstitute(p); @@ -72,7 +72,7 @@ if (r != FcResultMatch) { - error("fontconfig: match failed"); + font_specimen_error("fontconfig: match failed"); return NULL; } return match; @@ -83,10 +83,9 @@ const char *value) { FcPatternDel(pattern, object); - if (FcPatternAddString(pattern, object, (FcChar8 *)value) - != FcResultMatch) + if (!FcPatternAddString(pattern, object, (FcChar8 *)value)) { - error("fontconfig: cannot set string to pattern"); + font_specimen_error("fontconfig: cannot set string to pattern"); return -1; } return 0; @@ -99,7 +98,7 @@ if (FcPatternGetString(pattern, object, 0, (FcChar8**)value) != FcResultMatch) { - error("fontconfig: cannot get string from pattern"); + font_specimen_error("fontconfig: cannot get string from pattern"); return -1; } return 0; @@ -110,10 +109,9 @@ int value) { FcPatternDel(pattern, object); - if (FcPatternAddInteger(pattern, object, value) - != FcResultMatch) + if (!FcPatternAddInteger(pattern, object, value)) { - error("fontconfig: cannot set integer to pattern"); + font_specimen_error("fontconfig: cannot set integer to pattern"); return -1; } return 0; @@ -126,7 +124,7 @@ if (FcPatternGetInteger(pattern, object, 0, value) != FcResultMatch) { - error("fontconfig: cannot get integer from pattern"); + font_specimen_error("fontconfig: cannot get integer from pattern"); return -1; } return 0; @@ -137,10 +135,9 @@ double value) { FcPatternDel(pattern, object); - if (FcPatternAddDouble(pattern, object, value) - != FcResultMatch) + if (!FcPatternAddDouble(pattern, object, value)) { - error("fontconfig: cannot set double to pattern"); + font_specimen_error("fontconfig: cannot set double to pattern"); return -1; } return 0; @@ -153,7 +150,7 @@ if (FcPatternGetDouble(pattern, object, 0, value) != FcResultMatch) { - error("fontconfig: cannot get double from pattern"); + font_specimen_error("fontconfig: cannot get double from pattern"); return -1; } return 0; @@ -164,10 +161,9 @@ int value) { FcPatternDel(pattern, object); - if (FcPatternAddBool(pattern, object, value) - != FcResultMatch) + if (!FcPatternAddBool(pattern, object, value)) { - error("fontconfig: cannot set boolean to pattern"); + font_specimen_error("fontconfig: cannot set boolean to pattern"); return -1; } return 0; @@ -180,7 +176,7 @@ if (FcPatternGetBool(pattern, object, 0, value) != FcResultMatch) { - error("fontconfig: cannot get boolean from pattern"); + font_specimen_error("fontconfig: cannot get boolean from pattern"); return -1; } return 0; @@ -190,10 +186,9 @@ FcCharSet *value) { FcPatternDel(pattern, FC_CHARSET); - if (FcPatternAddCharSet(pattern, FC_CHARSET, value) - != FcResultMatch) + if (!FcPatternAddCharSet(pattern, FC_CHARSET, value)) { - error("fontconfig: cannot set charset to pattern"); + font_specimen_error("fontconfig: cannot set charset to pattern"); return -1; } return 0; @@ -205,7 +200,7 @@ if (FcPatternGetCharSet(pattern, FC_CHARSET, 0, value) != FcResultMatch) { - error("fontconfig: cannot get charset from pattern"); + font_specimen_error("fontconfig: cannot get charset from pattern"); return -1; } return 0; @@ -215,7 +210,7 @@ { FcPattern *res = FcPatternCreate(); if (! res) - error("fontconfig: cannot create pattern"); + font_specimen_error("fontconfig: cannot create pattern"); return res; } @@ -223,7 +218,7 @@ { FcPattern *res = FcPatternDuplicate(orig); if (! res) - error("fontconfig: cannot create duplicate pattern"); + font_specimen_error("fontconfig: cannot create duplicate pattern"); return res; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/font-specimen.c new/font-specimen-20141113/font-specimen.c --- old/font-specimen-20140711/font-specimen.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/font-specimen.c 2014-11-13 12:41:05.000000000 +0100 @@ -153,6 +153,7 @@ break; case 'd': specimen_set_debug(1); + break; case 'l': script_list = 1; break; @@ -231,7 +232,7 @@ if (specimen_write(type, pattern, script, png, width, height) < 0) { - fprintf(stderr, "Can not write specimen."); + fprintf(stderr, "Can not write specimen.\n"); return 1; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/ft.c new/font-specimen-20141113/ft.c --- old/font-specimen-20140711/ft.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/ft.c 2014-11-13 12:41:05.000000000 +0100 @@ -39,7 +39,7 @@ FT_Library library; if (FT_Init_FreeType(&library)) { - error("freetype: can not initialize library"); + font_specimen_error("freetype: can not initialize library"); return NULL; } FT_Library_Version(library, &major, &minor, &patch); @@ -58,7 +58,7 @@ bitmap->data = (unsigned char **)malloc(height*sizeof(unsigned char *)); if (! bitmap->data) { - error("freetype: no free memory"); + font_specimen_error("freetype: no free memory"); return -1; } @@ -67,7 +67,7 @@ bitmap->data[row] = (unsigned char *)malloc(width*sizeof(unsigned char)); if (! bitmap->data[row]) { - error("freetype: out of memory"); + font_specimen_error("freetype: out of memory"); return -1; } memset(bitmap->data[row], 255, width*sizeof(unsigned char)); /* white */ @@ -79,7 +79,7 @@ err = FT_Init_FreeType(&bitmap->library); if (err) { - error("freetype: can not initialize library"); + font_specimen_error("freetype: can not initialize library"); return -1; } @@ -168,14 +168,14 @@ err = FT_New_Face(bitmap->library, (char *)file, 0, &bitmap->face); if (err) { - error("freetype: can not create face object"); + font_specimen_error("freetype: can not create face object"); return -1; } err = FT_Set_Pixel_Sizes(bitmap->face, 0, pxsize); if (err) { - error("freetype: can not set face size"); + font_specimen_error("freetype: can not set face size"); return -1; } @@ -258,7 +258,7 @@ if (new_height < 0 || new_height > bitmap->height) { - error("freetype: can not reduce height (wrong new_height)"); + font_specimen_error("freetype: can not reduce height (wrong new_height)"); return -1; } @@ -305,7 +305,9 @@ if (monochrome) { if (glyph->buffer[glyph->pitch * q + (p >> 3)] & (128 >> (p & 7))) - bitmap.data[j][i] = ~(255*bitmap.grayscale/100); + { + bitmap.data[j][i] = ~(~bitmap.data[j][i] | (255*bitmap.grayscale/100)); + } } else { @@ -384,7 +386,7 @@ glyphs = malloc(nglyphs*sizeof(FT_Glyph)); if (glyph_positions == NULL || glyphs == NULL) { - error("freetype: out of memory"); + font_specimen_error("freetype: out of memory"); return -1; } @@ -407,14 +409,14 @@ glyph_codepoints[g], bitmap->load_flags); if (err) { - error("freetype: can not load glyph"); + font_specimen_error("freetype: can not load glyph"); return -1; } err = FT_Get_Glyph(bitmap->face->glyph, &glyphs[g]); if (err) { - error("freetype: can not get glyph"); + font_specimen_error("freetype: can not get glyph"); return -1; } } @@ -439,7 +441,7 @@ NULL, 1); if (err) { - error("freetype: can not render glyph"); + font_specimen_error("freetype: can not render glyph"); return -1; } @@ -501,7 +503,7 @@ = (unsigned char **)malloc(bitmap->height*sizeof(unsigned char *)); if (! bitmap->data) { - error("freetype: no free memory"); + font_specimen_error("freetype: no free memory"); return -1; } @@ -511,7 +513,7 @@ = (unsigned char *)malloc(bitmap->width*sizeof(unsigned char)); if (! bitmap->data[row]) { - error("freetype: no free memory"); + font_specimen_error("freetype: no free memory"); return -1; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/hbz.c new/font-specimen-20141113/hbz.c --- old/font-specimen-20140711/hbz.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/hbz.c 2014-11-13 12:41:05.000000000 +0100 @@ -83,7 +83,7 @@ if (glyph_count <= 0) { - error("harfbuzz: glyph positions couldn't be figured out"); + font_specimen_error("harfbuzz: glyph positions couldn't be figured out"); return 1; } @@ -94,7 +94,7 @@ *glyph_offsets == NULL || *glyph_advances == NULL) { - error("harfbuzz: out of memory"); + font_specimen_error("harfbuzz: out of memory"); return -1; } @@ -105,7 +105,7 @@ script for certain size */ if (hb_glyph_infos[g].codepoint == 0) { - error("harfbuzz: no size for this font and script"); + font_specimen_error("harfbuzz: no size for this font and script"); return -1; } (*glyph_codepoints)[g] = hb_glyph_infos[g].codepoint; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/img_png.c new/font-specimen-20141113/img_png.c --- old/font-specimen-20140711/img_png.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/img_png.c 2014-11-13 12:41:05.000000000 +0100 @@ -42,7 +42,7 @@ if (len % 3 == 0) { - error("img_png: bitmap lenght of row is not multiple of 3"); + font_specimen_error("img_png: bitmap lenght of row is not multiple of 3"); return NULL; } @@ -65,20 +65,20 @@ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) { - error("img_png: can nott create write structure"); + font_specimen_error("img_png: can nott create write structure"); return -1; } info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL) { - error("img_png: can not create info structure"); + font_specimen_error("img_png: can not create info structure"); return -1; } if (setjmp(png_jmpbuf(png_ptr))) { - error("img_png: can not set png error handler"); + font_specimen_error("img_png: can not set png error handler"); return -1; } @@ -114,7 +114,6 @@ } png_write_end(png_ptr, NULL); - fclose(png); png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); png_destroy_write_struct(&png_ptr, (png_infopp)NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/specimen.c new/font-specimen-20141113/specimen.c --- old/font-specimen-20140711/specimen.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/specimen.c 2014-11-13 12:41:05.000000000 +0100 @@ -50,7 +50,7 @@ void specimen_set_debug(int on) { - debug = on; + set_debug(on); } static int strings_waterfall(uint32_t string[], @@ -82,7 +82,7 @@ if (nsizes <= 0 || size_to > MAX_PX_SIZE) { - error("specimen: wrong size intervals"); + font_specimen_error("specimen: wrong size intervals"); return -1; } @@ -90,7 +90,7 @@ if (!*strings) { - error("specimen: not enough memory"); + font_specimen_error("specimen: not enough memory"); return -1; } @@ -179,7 +179,7 @@ if (!*strings) { - error("specimen: no memory"); + font_specimen_error("specimen: no memory"); return -1; } @@ -368,7 +368,7 @@ return -1; if (random == 2) { - error("specimen: no symbols for this font and script"); + font_specimen_error("specimen: no symbols for this font and script"); return -1; } @@ -436,6 +436,7 @@ ft_free_bitmap(&bitmap); free(strings); fontconfig_pattern_destroy(fnt); + return 0; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/specimen.h new/font-specimen-20141113/specimen.h --- old/font-specimen-20140711/specimen.h 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/specimen.h 2014-11-13 12:41:05.000000000 +0100 @@ -33,8 +33,9 @@ typedef enum { - SCRIPT_SORT_PERCENT, - SCRIPT_SORT_ABSOLUTE + SCRIPT_SORT_NONE, + SCRIPT_SORT_ABSOLUTE, + SCRIPT_SORT_PERCENT } script_sort_t; /* width = 0 => width automatic, height = 0 => height automatic */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/font-specimen-20140711/unicode.c new/font-specimen-20141113/unicode.c --- old/font-specimen-20140711/unicode.c 2014-11-07 11:02:12.000000000 +0100 +++ new/font-specimen-20141113/unicode.c 2014-11-13 12:41:05.000000000 +0100 @@ -145,9 +145,9 @@ FcCharSet *charset; *stats = (uinterval_stat_t*)malloc(sizeof(uinterval_stat_t)*map_len); - if (!stats) + if (!*stats) { - error("unicode: out of memory"); + font_specimen_error("unicode: out of memory"); return -1; } bzero(*stats, sizeof(uinterval_stat_t)*map_len); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
