Date: Fri, 25 Jul 2003 00:19:08 +0800 (CST) From: Statue <statue@freebsd.sinica.edu.tw> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/54819: Update port: print/wprint Message-ID: <20030724161908.091AA9EF@freebsd.sinica.edu.tw> Resent-Message-ID: <200307241620.h6OGKC4n093562@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 54819 >Category: ports >Synopsis: Update port: print/wprint >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Jul 24 09:20:12 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Statue >Release: FreeBSD 4.7-PRERELEASE i386 >Organization: >Environment: System: FreeBSD freebsd.sinica.edu.tw 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #2: Mon Sep 9 10:45:46 CST 2002 ycheng@freebsd.sinica.edu.tw:/usr/src/sys/compile/GENERIC i386 >Description: A patch for hinting ftface. you can use follows to specify mingliu.ttc font face 1. default:EUC-TW:mingliu.ttc=zh_TW.Big5;14;14;72;1:wprint.ps >How-To-Repeat: >Fix: diff -ruN wprint.orig/files/patch-hinting-ftface.diff wprint/files/patch-hinting-ftface.diff --- wprint.orig/files/patch-hinting-ftface.diff Thu Jan 1 08:00:00 1970 +++ wprint/files/patch-hinting-ftface.diff Fri Jul 25 00:16:40 2003 @@ -0,0 +1,91 @@ +diff -ur src/wprint-ft2.c.orig src/wprint-ft2.c +--- src/wprint-ft2.c.orig 2001-10-26 02:41:29.000000000 +0800 ++++ src/wprint-ft2.c 2003-07-19 15:18:55.000000000 +0800 +@@ -20,8 +20,11 @@ + Error("Couldn't find suitable Cmap"); + + index = FT_Get_Char_Index(ti->font.ttface,unicode ); ++ ++ FT_Set_Char_Size (ti->font.ttface, 0, 16*64, 0, 0); + +- if((error=FT_Load_Glyph(ti->font.ttface, index, FT_LOAD_NO_SCALE))) ++ if((error=FT_Load_Glyph(ti->font.ttface, index, FT_LOAD_NO_BITMAP ++ | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH))) + FTError("Couldn't load glyph", error); + glyphToPs(out,unicode,ti,b64name); + +@@ -280,13 +283,13 @@ + { + FT_Done_Face(ti->font.ttface); + } +-int setFont(struct tt_info *ti,char *file) ++int setFont(struct tt_info *ti,char *file,int faceindex) + { + int error; + int i,l,total; + FT_SfntName name; + +- if ((error = FT_New_Face(ti->ttengine,file,0,&(ti->font.ttface)) != 0)) ++ if ((error = FT_New_Face(ti->ttengine,file,faceindex,&(ti->font.ttface)) != 0)) + { + FTError("Coudn't set TrueType font", error); + } +diff -ur src/wprint.c.orig src/wprint.c +--- src/wprint.c.orig 2002-04-02 04:59:57.000000000 +0800 ++++ src/wprint.c 2003-07-19 15:18:32.000000000 +0800 +@@ -518,6 +518,7 @@ + fnc[i].xr = 72; + fnc[i].yr = 72; + fnc[i].pt = 14.0; ++ fnc[i].faceindex = 0; + + comma = strchr(from,','); + if (comma != NULL) +@@ -531,8 +532,8 @@ + + *p = 0; + if (strchr(p + 1,';') != NULL) +- sscanf(p + 1,"%[^;];%d;%d;%lf",enco, +- &fnc[i].xr,&fnc[i].yr,&fnc[i].pt); ++ sscanf(p + 1,"%[^;];%d;%d;%lf;%d",enco, ++ &fnc[i].xr,&fnc[i].yr,&fnc[i].pt,&fnc[i].faceindex); + else + strcpy(enco,p + 1); + +@@ -559,6 +560,7 @@ + fnc[i].xr = fnc[i - 1].xr; + fnc[i].yr = fnc[i - 1].yr; + fnc[i].pt = fnc[i - 1].pt; ++ fnc[i].faceindex = fnc[i - 1].faceindex; + } + } + return(i); +@@ -925,7 +927,7 @@ + ttglobalinfo.font.xr = fnc[i].xr; + ttglobalinfo.font.yr = fnc[i].yr; + ttglobalinfo.font.charsize = fnc[i].pt; +- setFont(&ttglobalinfo,fnc[i].filename); ++ setFont(&ttglobalinfo,fnc[i].filename,fnc[i].faceindex); + generateFont(out,aux,&ttglobalinfo); + unsetFont(&ttglobalinfo); + } +diff -ur src/wprint.h.orig src/wprint.h +--- src/wprint.h.orig 2002-04-02 04:39:04.000000000 +0800 ++++ src/wprint.h 2003-07-19 14:58:57.000000000 +0800 +@@ -152,6 +152,7 @@ + int xr; + int yr; + double pt; ++ int faceindex; + }; + typedef struct + { +@@ -161,7 +162,7 @@ + Font *newFont(unsigned short fid,unsigned short feid); + Font *addChar(unsigned short unicode,int fontid); + int initTT(struct tt_info *ti); +-int setFont(struct tt_info *ti,char *); ++int setFont(struct tt_info *ti,char *,int faceindex); + int unsetFont(struct tt_info *ti); + void finalizeTT(struct tt_info *ti); + FILE *processConfiguration(FILE *in,char *entry,char *encoding); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030724161908.091AA9EF>