Hello community, here is the log from the commit of package gfxboot for openSUSE:Factory checked in at Sat Oct 3 02:49:50 CEST 2009. -------- --- gfxboot/gfxboot.changes 2009-09-29 12:06:25.000000000 +0200 +++ gfxboot/gfxboot.changes 2009-10-02 15:37:45.000000000 +0200 @@ -1,0 +2,10 @@ +Fri Oct 2 15:37:24 CEST 2009 - snwint@suse.de + +- build new font +- enhanced gfxboot-font +- cleaned up po files +- more flexible translation support +- livecd: add F4=kerneloptions +- fix pot file + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- gfxboot-4.1.28.tar.bz2 New: ---- gfxboot-4.1.30.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gfxboot.spec ++++++ --- /var/tmp/diff_new_pack.pDirtu/_old 2009-10-03 02:46:14.000000000 +0200 +++ /var/tmp/diff_new_pack.pDirtu/_new 2009-10-03 02:46:14.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package gfxboot (Version 4.1.28) +# spec file for package gfxboot (Version 4.1.30) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -27,10 +27,10 @@ Requires: coreutils cpio mktemp perl master-boot-code dosfstools mtools perl-HTML-Parser AutoReqProv: on Summary: Graphical Boot Logo for GRUB, LILO and SYSLINUX -Version: 4.1.28 +Version: 4.1.30 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gfxboot-4.1.28.tar.bz2 +Source: gfxboot-4.1.30.tar.bz2 Source1: openSUSE.tar.bz2 Source2: SLED.tar.bz2 Source3: SLES.tar.bz2 ++++++ SLED.tar.bz2 ++++++ ++++++ SLES.tar.bz2 ++++++ ++++++ gfxboot-4.1.28.tar.bz2 -> gfxboot-4.1.30.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.1.28/Changelog new/gfxboot-4.1.30/Changelog --- old/gfxboot-4.1.28/Changelog 2009-09-29 12:02:56.000000000 +0200 +++ new/gfxboot-4.1.30/Changelog 2009-10-02 15:36:10.000000000 +0200 @@ -1,3 +1,13 @@ +2/10/2009: v4.1.30 + - fix pot file + +30/9/2009: v4.1.29 + - build new font + - enhanced gfxboot-font + - cleaned up po files + - more flexible translation support + - livecd: add F4=kerneloptions + 29/9/2009: v4.1.28 - set default install type correctly (bnc #542781) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.1.28/VERSION new/gfxboot-4.1.30/VERSION --- old/gfxboot-4.1.28/VERSION 2009-09-29 12:01:29.000000000 +0200 +++ new/gfxboot-4.1.30/VERSION 2009-10-02 15:35:47.000000000 +0200 @@ -1 +1 @@ -4.1.28 +4.1.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.1.28/gfxboot new/gfxboot-4.1.30/gfxboot --- old/gfxboot-4.1.28/gfxboot 2009-09-21 13:42:17.000000000 +0200 +++ new/gfxboot-4.1.30/gfxboot 2009-10-01 16:19:52.000000000 +0200 @@ -1958,6 +1958,8 @@ my $vm_env = shift; my $q = $vm_list{$opt_vm}{cmd}; + $q .= " -m 512"; + $q .= " -boot c" if $vm_env->{boot} eq 'hd'; $q .= " -boot d" if $vm_env->{boot} eq 'cd'; $q .= " -boot a" if $vm_env->{boot} eq 'fd'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gfxboot-4.1.28/gfxboot-font.c new/gfxboot-4.1.30/gfxboot-font.c --- old/gfxboot-4.1.28/gfxboot-font.c 2009-09-21 13:42:17.000000000 +0200 +++ new/gfxboot-4.1.30/gfxboot-font.c 2009-09-30 14:51:28.000000000 +0200 @@ -32,6 +32,7 @@ { "add-charset", 1, NULL, 'c' }, { "font", 1, NULL, 'f' }, { "line-height", 1, NULL, 'l' }, + { "font-height", 1, NULL, 'H' }, { "font-path", 1, NULL, 'p' }, { "show", 0, NULL, 's' }, { "add-text", 1, NULL, 't' }, @@ -78,17 +79,24 @@ int prop; int space_width; int dy; + unsigned index; + int height; + int baseline; list_t chars; /* n_set_t */ unsigned used:1; /* font is actually used */ unsigned ok:1; unsigned bold:1; unsigned nobitmap:1; unsigned autohint:2; /* 0: auto, 1: off, 2: on */ + unsigned autosize:1; + unsigned autoshift:1; } font_t; typedef struct char_data_s { struct char_data_s* next; unsigned ok:1; /* char exists */ + unsigned top:1; + unsigned bottom:1; int c; /* char (utf32) */ font_t *font; /* pointer to font */ int x_advance; @@ -104,6 +112,8 @@ list_t font_list; /* font_t */ list_t char_list; /* char_data_t */ list_t chars_missing; /* n_set_t */ +list_t chars_top; /* n_set_t */ +list_t chars_bottom; /* n_set_t */ int font_height; int font_y_ofs; @@ -112,6 +122,7 @@ int verbose; int test; int line_height; + int max_font_height; char *font_path; list_t chars; /* n_set_t */ char *file; @@ -143,6 +154,7 @@ int unsigned_bits(unsigned num); void encode_char(char_data_t *cd); int show_font(char *name); +void get_font_height(font_t *font, int *height, int *y_ofs); int main(int argc, char **argv) @@ -174,7 +186,7 @@ opterr = 0; - while((i = getopt_long(argc, argv, "a:c:f:l:p:st:v", options, NULL)) != -1) { + while((i = getopt_long(argc, argv, "Aa:c:f:H:l:p:st:v", options, NULL)) != -1) { switch(i) { case 'a': err = parse_int_list(&opt.chars, optarg); @@ -243,6 +255,14 @@ font->autohint = strtol(s, &s1, 0) + 1; if(*s1) err = 1; } + else if(!strcmp(str, "autosize")) { + font->autosize = strtol(s, &s1, 0); + if(*s1) err = 1; + } + else if(!strcmp(str, "autoshift")) { + font->autoshift = strtol(s, &s1, 0); + if(*s1) err = 1; + } else if(!strcmp(str, "c")) { err = parse_int_list(&font->chars, s); } @@ -265,6 +285,16 @@ } break; + case 'H': + str = optarg; + i = strtol(str, &str1, 0); + if(*str1 || i < 0) { + fprintf(stderr, "%s: invalid font height\n", str); + return 1; + } + opt.max_font_height = i; + break; + case 'l': str = optarg; i = strtol(str, &str1, 0); @@ -379,7 +409,8 @@ } // open all fonts - for(font = font_list.start; font; font = font->next) { + for(i = 0, font = font_list.start; font; font = font->next) { + font->index = i++; font->file_name = search_font(opt.font_path, font->name); if(font->file_name) { err = FT_New_Face(ft_lib, font->file_name, 0, &font->face); @@ -392,42 +423,11 @@ if( font->size && !FT_Set_Pixel_Sizes(font->face, font->size, 0) - ) font->ok = 1; - } - } - } - - // print some info - if(opt.verbose) { - printf("Font List\n"); - for(font = font_list.start; font; font = font->next) { - printf(" %s (%s)\n", font->name, font->ok ? "ok" : "not used"); - printf(" File %s\n", font->file_name); - printf(" Size %d", font->size); - if(font->dy) printf(", dY %d", font->dy); - if(font->prop) printf(", Prop %d", font->prop); - if(font->space_width) printf(", SpaceWidth %d", font->space_width); - printf("\n"); - if(font->chars.start) { - for(n = font->chars.start; n; n = n->next) { - printf(" c 0x%04x", n->first); - if(n->last != n->first) printf("-0x%04x", n->last); - printf("\n"); + ) { + font->ok = 1; } } } - printf("\n"); - } - - // print even more info - if(opt.verbose >= 2) { - printf("Requested Char List\n"); - for(n = opt.chars.start; n; n = n->next) { - printf(" 0x%04x", n->first); - if(n->last != n->first) printf("-0x%04x", n->last); - printf("\n"); - } - printf("\n"); } // build char list @@ -452,31 +452,50 @@ render_char(cd); } - FT_Done_FreeType(ft_lib); - // fix vertical glyph positions for(cd = char_list.start; cd; cd = cd->next) { if(cd->ok) cd->y_ofs += cd->font->dy; } + if(!opt.test) for(cd = char_list.start; cd; cd = cd->next) add_bbox(cd); + +// ############## + // get font dimensions - font_height = font_y_ofs = 0; - for(cd = char_list.start; cd; cd = cd->next) { - if(cd->y_ofs < font_y_ofs) font_y_ofs = cd->y_ofs; - i = cd->bitmap_height + cd->y_ofs; - if(i > font_height) font_height = i; + get_font_height(NULL, &font_height, &font_y_ofs); + + for(font = font_list.start; font; font = font->next) { + if(!font->ok) continue; + get_font_height(font, &i, &j); + font->height = i; + font->baseline = -j; } - font_height -= font_y_ofs; +// ############## - if(!opt.test) for(cd = char_list.start; cd; cd = cd->next) add_bbox(cd); + FT_Done_FreeType(ft_lib); + + // label largest chars + for(cd = char_list.start; cd; cd = cd->next) { + if(!cd->ok) continue; + if(cd->y_ofs - font_y_ofs + cd->bitmap_height >= font_height) cd->top = 1; + if(cd->y_ofs - font_y_ofs <= 0) cd->bottom = 1; + } for(cd = char_list.start; cd; cd = cd->next) make_prop(cd); - for(i = j = 0, cd = char_list.start; cd; cd = cd->next) { + for(cd = char_list.start; cd; cd = cd->next) { if(!cd->ok) insert_int_list(&chars_missing, cd->c, cd->c); } + for(cd = char_list.start; cd; cd = cd->next) { + if(cd->ok && cd->top) insert_int_list(&chars_top, cd->c, cd->c); + } + + for(cd = char_list.start; cd; cd = cd->next) { + if(cd->ok && cd->bottom) insert_int_list(&chars_bottom, cd->c, cd->c); + } + for(cd = char_list.start; cd; cd = cd->next) encode_char(cd); memset(&fh, 0, sizeof fh); @@ -488,6 +507,39 @@ for(cd = char_list.start; cd; cd = cd->next) if(cd->ok) fh.entries++; + // print font info + if(opt.verbose) { + printf("Font List\n"); + for(font = font_list.start; font; font = font->next) { + printf(" #%d %s (%s)\n", font->index, font->name, font->ok ? "ok" : "not used"); + printf(" File %s\n", font->file_name); + printf(" Size %d", font->size); + if(font->dy) printf(", dY %d", font->dy); + if(font->prop) printf(", Prop %d", font->prop); + if(font->space_width) printf(", SpaceWidth %d", font->space_width); + printf("\n"); + printf(" Height %d, Baseline %d\n", font->height, font->baseline); + if(font->chars.start) { + for(n = font->chars.start; n; n = n->next) { + printf(" c 0x%04x", n->first); + if(n->last != n->first) printf("-0x%04x", n->last); + printf("\n"); + } + } + } + printf("\n"); + } + + if(opt.verbose >= 2) { + printf("Requested Char List\n"); + for(n = opt.chars.start; n; n = n->next) { + printf(" 0x%04x", n->first); + if(n->last != n->first) printf("-0x%04x", n->last); + printf("\n"); + } + printf("\n"); + } + if(opt.verbose) { if(chars_missing.start) { printf("Missing Chars\n"); @@ -499,6 +551,26 @@ printf("\n"); } + if(chars_top.start) { + printf("Top Chars\n"); + for(n = chars_top.start; n; n = n->next) { + printf(" 0x%04x", n->first); + if(n->last != n->first) printf("-0x%04x", n->last); + printf("\n"); + } + printf("\n"); + } + + if(chars_bottom.start) { + printf("Bottom Chars\n"); + for(n = chars_bottom.start; n; n = n->next) { + printf(" 0x%04x", n->first); + if(n->last != n->first) printf("-0x%04x", n->last); + printf("\n"); + } + printf("\n"); + } + printf( "Font Size\n Height: %d\n Baseline: %d\n Line Height: %d\n\n", font_height, -font_y_ofs, fh.line_height @@ -583,9 +655,12 @@ if(!cd || !cd->ok) return; - printf("Char 0x%04x '%s'\n", cd->c, utf32_to_utf8(cd->c)); + printf("Char 0x%04x '%s'", cd->c, utf32_to_utf8(cd->c)); + if(cd->top) printf(" top"); + if(cd->bottom) printf(" bottom"); + printf("\n"); - if(cd->font) printf(" Font: %s (%d)\n", cd->font->name, cd->font->size); + if(cd->font) printf(" Font: #%d %s (%d)\n", cd->font->index, cd->font->name, cd->font->size); printf( " Bitmap: %d x %d\n Advance: %d\n Offset: %d x %d\n", @@ -882,88 +957,107 @@ void render_char(char_data_t *cd) { - font_t *font; n_set_t *n; int err, glyph_index; FT_GlyphSlot glyph; int i, j; unsigned char uc; - for(font = font_list.start; font; font = font->next) { - if(!font->ok) continue; - if(font->chars.start) { - for(n = font->chars.start; n; n = n->next) { - if(cd->c >= n->first && cd->c <= n->last) break; - } - if(!n) continue; - } - glyph_index = FT_Get_Char_Index(font->face, cd->c); - if(!glyph_index) continue; + if(cd->ok) { + glyph_index = FT_Get_Char_Index(cd->font->face, cd->c); + if(!glyph_index) return; err = FT_Load_Char( - font->face, + cd->font->face, cd->c, FT_LOAD_RENDER | - (font->nobitmap ? FT_LOAD_NO_BITMAP : 0) | - (font->autohint ? font->autohint == 1 ? FT_LOAD_NO_AUTOHINT : FT_LOAD_FORCE_AUTOHINT : 0) + (cd->font->nobitmap ? FT_LOAD_NO_BITMAP : 0) | + (cd->font->autohint ? cd->font->autohint == 1 ? FT_LOAD_NO_AUTOHINT : FT_LOAD_FORCE_AUTOHINT : 0) ); - if(err) continue; + if(err) return; + } + else { + font_t *font; - cd->ok = 1; + for(font = font_list.start; font; font = font->next) { + if(!font->ok) continue; + if(font->chars.start) { + for(n = font->chars.start; n; n = n->next) { + if(cd->c >= n->first && cd->c <= n->last) break; + } + if(!n) continue; + } - cd->font = font; + glyph_index = FT_Get_Char_Index(font->face, cd->c); + if(!glyph_index) continue; - glyph = font->face->glyph; - if(cd->font->bold) FT_GlyphSlot_Embolden(glyph); + err = FT_Load_Char( + font->face, + cd->c, + FT_LOAD_RENDER | + (font->nobitmap ? FT_LOAD_NO_BITMAP : 0) | + (font->autohint ? font->autohint == 1 ? FT_LOAD_NO_AUTOHINT : FT_LOAD_FORCE_AUTOHINT : 0) + ); + if(err) continue; - cd->bitmap_width = glyph->bitmap.width; - cd->bitmap_height = glyph->bitmap.rows; - cd->bitmap = new_mem(cd->bitmap_width * cd->bitmap_height); - - cd->x_advance = glyph->advance.x / 64.; - cd->x_ofs = glyph->bitmap_left; - cd->y_ofs = glyph->bitmap_top - glyph->bitmap.rows; - - for(j = 0; j < cd->bitmap_height; j++) { - for(i = 0; i < cd->bitmap_width; i++) { - switch(glyph->bitmap.pixel_mode) { - case FT_PIXEL_MODE_MONO: - uc = ((glyph->bitmap.buffer[i / 8 + j * glyph->bitmap.pitch] >> (7 - (i & 7))) & 1) * MAX_GRAY; - break; - - case FT_PIXEL_MODE_GRAY: - uc = (glyph->bitmap.buffer[i + j * glyph->bitmap.pitch] * (MAX_GRAY + 1)) / (255 + 1); - break; + cd->ok = 1; + cd->font = font; - default: - uc = 0; - } - cd->bitmap[i + j * cd->bitmap_width] = uc; + break; + } + } + + if(!cd->ok) return; + + glyph = cd->font->face->glyph; + if(cd->font->bold) FT_GlyphSlot_Embolden(glyph); + + cd->bitmap_width = glyph->bitmap.width; + cd->bitmap_height = glyph->bitmap.rows; + free(cd->bitmap); + cd->bitmap = new_mem(cd->bitmap_width * cd->bitmap_height); + + cd->x_advance = glyph->advance.x / 64.; + cd->x_ofs = glyph->bitmap_left; + cd->y_ofs = glyph->bitmap_top - glyph->bitmap.rows; + + for(j = 0; j < cd->bitmap_height; j++) { + for(i = 0; i < cd->bitmap_width; i++) { + switch(glyph->bitmap.pixel_mode) { + case FT_PIXEL_MODE_MONO: + uc = ((glyph->bitmap.buffer[i / 8 + j * glyph->bitmap.pitch] >> (7 - (i & 7))) & 1) * MAX_GRAY; + break; + + case FT_PIXEL_MODE_GRAY: + uc = (glyph->bitmap.buffer[i + j * glyph->bitmap.pitch] * (MAX_GRAY + 1)) / (255 + 1); + break; + + default: + uc = 0; } + cd->bitmap[i + j * cd->bitmap_width] = uc; } + } #if 0 - printf( - "bitmap: mode %d, %d x %d, + %d x %d, advance %f x %f\n", - glyph->bitmap.pixel_mode, - glyph->bitmap.width, - glyph->bitmap.rows, - glyph->bitmap_left, - glyph->bitmap_top, - glyph->advance.x / 64., - glyph->advance.y / 64. - ); + printf( + "bitmap: mode %d, %d x %d, + %d x %d, advance %f x %f\n", + glyph->bitmap.pixel_mode, + glyph->bitmap.width, + glyph->bitmap.rows, + glyph->bitmap_left, + glyph->bitmap_top, + glyph->advance.x / 64., + glyph->advance.y / 64. + ); - printf( - "metrics:\n size %f x %f\n bearing %f x %f, advance %f\n", - glyph->metrics.width / 64., glyph->metrics.height / 64., - glyph->metrics.horiBearingX / 64., glyph->metrics.horiBearingY / 64., - glyph->metrics.horiAdvance / 64. - ); + printf( + "metrics:\n size %f x %f\n bearing %f x %f, advance %f\n", + glyph->metrics.width / 64., glyph->metrics.height / 64., + glyph->metrics.horiBearingX / 64., glyph->metrics.horiBearingY / 64., + glyph->metrics.horiAdvance / 64. + ); #endif - - break; - } } @@ -1028,6 +1122,10 @@ cd->bitmap_width = width; cd->bitmap_height = height; } + + if(!cd->bitmap_width || !cd->bitmap_height) { + cd->x_ofs = cd->y_ofs = 0; + } } @@ -1391,3 +1489,23 @@ } +void get_font_height(font_t *font, int *height, int *y_ofs) +{ + int h, dy, i; + char_data_t *cd; + + // get font dimensions + h = dy = 0; + for(cd = char_list.start; cd; cd = cd->next) { + if(!cd->ok) continue; + if(font && cd->font != font) continue; + if(cd->y_ofs < dy) dy = cd->y_ofs; + i = cd->bitmap_height + cd->y_ofs; + if(i > h) h = i; + } + + *height = h - dy; + *y_ofs = dy; +} + + ++++++ openSUSE.tar.bz2 ++++++ ++++ 27796 lines of diff (skipped) ++++++ upstream.tar.bz2 ++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org