From statue@freebsd.sinica.edu.tw  Mon Jul 29 19:52:49 2002
Return-Path: <statue@freebsd.sinica.edu.tw>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 9269137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 2002 19:52:49 -0700 (PDT)
Received: from freebsd.sinica.edu.tw (freebsd.sinica.edu.tw [140.109.13.51])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3853543E3B
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Jul 2002 19:52:49 -0700 (PDT)
	(envelope-from statue@freebsd.sinica.edu.tw)
Received: by freebsd.sinica.edu.tw (Postfix, from userid 1014)
	id E9CAF886; Tue, 30 Jul 2002 10:52:48 +0800 (CST)
Message-Id: <20020730025248.E9CAF886@freebsd.sinica.edu.tw>
Date: Tue, 30 Jul 2002 10:52:48 +0800 (CST)
From: Statue <statue@freebsd.sinica.edu.tw>
Reply-To: Statue <statue@freebsd.sinica.edu.tw>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update port: chinese/ttfm
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41141
>Category:       ports
>Synopsis:       Update port: chinese/ttfm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    keith
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 29 20:00:11 PDT 2002
>Closed-Date:    Sat Aug 03 12:33:40 PDT 2002
>Last-Modified:  Sat Aug 03 12:33:40 PDT 2002
>Originator:     Statue
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD freebsd.sinica.edu.tw 4.6-STABLE FreeBSD 4.6-STABLE #1: Tue Jul 23 15:34:20 CST 2002 ycheng@freebsd.sinica.edu.tw:/usr/src/sys/compile/GENERIC i386


	
>Description:
update files/patch-ttfinfo.c
	
>How-To-Repeat:
	
>Fix:

diff -ruN ttfm.orig/files/patch-ttfinfo.c ttfm/files/patch-ttfinfo.c
--- ttfm.orig/files/patch-ttfinfo.c	Tue Jul 30 10:50:06 2002
+++ ttfm/files/patch-ttfinfo.c	Tue Jul 30 10:48:53 2002
@@ -1,5 +1,5 @@
---- ttfinfo.c.orig	Fri Apr 19 18:30:44 2002
-+++ ttfinfo.c	Fri Apr 19 18:31:02 2002
+--- ttfinfo.c.orig	Sun Dec 17 02:56:41 2000
++++ ttfinfo.c	Tue Jul 30 10:48:21 2002
 @@ -112,6 +112,7 @@
  static void  usage             (const char *name);
  static const char *get_foundry (const TT_Char orig_code[4]);
@@ -41,7 +41,7 @@
      */
      for (k = 0; k < 2; k++) {
  
-@@ -1276,6 +1280,97 @@
+@@ -1276,6 +1280,99 @@
  		    }
  	    }
  	}
@@ -120,6 +120,7 @@
 +			TT_UShort string_len;
 +			static char  name_buffer[513];
 +			int   name_len;
++			int   english=1;
 +
 +			TT_Get_Name_String (face, i, &string, &string_len);
 +			string_len =  string_len < 512 ? string_len : 512;
@@ -129,11 +130,12 @@
 +			  /* drop the NULL part, dont't use j+=2 to avoid
 +			     endian problem. */
 +			  if (string[j] != '\0'){
++			    if ((string[j] & 0xff) > 0x7f) english=0;
 +			    name_buffer[name_len++] = string[j];
 +			  }
 +			}
 +			name_buffer[name_len] = '\0';
-+			return name_buffer;
++			if (english) return name_buffer;
 +		    }
 +	    }
      }
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->keith 
Responsible-Changed-By: pat 
Responsible-Changed-When: Tue Jul 30 11:32:43 PDT 2002 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41141 
State-Changed-From-To: open->closed 
State-Changed-By: clive 
State-Changed-When: Sat Aug 3 12:33:30 PDT 2002 
State-Changed-Why:  
COmmitted, thanks 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41141 
>Unformatted:
