Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 07 May 2007 10:44:37 +0400
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        ume@FreeBSD.org
Subject:   ports/112474: Japanese font patch for print/cups-pstoraster
Message-ID:  <E1HkwxZ-0007q0-PT@pobox.codelabs.ru>
Resent-Message-ID: <200705070650.l476o3sI060448@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         112474
>Category:       ports
>Synopsis:       Japanese font patch for print/cups-pstoraster
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 07 06:50:02 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
Code Labs
>Environment:
System: FreeBSD XXX 6.2-STABLE FreeBSD 6.2-STABLE #22: Fri Apr 20 10:17:03 MSD 2007 XXX:/usr/src/sys/i386/compile/XXX i386
>Description:
Hajimu Umemoto noted that the ghostscript-gpl was given a patch that
will enable it to recognise Japanese documents in CJK encoding. Upon
his request I created the patch for the cups-pstoraster that will
enable CJK processing too.
>How-To-Repeat:
Take any Japanese PostScript document and try to print it with CUPS.
You will got weird output instead of Japanese symbols.
>Fix:
Please, credit Hajimu Umemoto, ume at freebsd dot org, in the
commit message: he helped me to refine the patch and was the
initiator of the issue.

The patch follows (port version was not bumped since interested users
will need to specify WITH_CJK to get the functionality and others
will not get any gain from the patch):
diff -urN ./Makefile ../cups-pstoraster/Makefile
--- ./Makefile	Sat Apr 28 15:42:32 2007
+++ ../cups-pstoraster/Makefile	Thu May  3 09:32:00 2007
@@ -18,6 +18,12 @@
 
 LIB_DEPENDS=	cups.2:${PORTSDIR}/print/cups-base
 
+.if defined(WITH_CJK)
+RUN_DEPENDS+=	${LOCALBASE}/share/fonts/TrueType/ipag.ttf:${PORTSDIR}/japanese/ipa-ttfonts \
+		${LOCALBASE}/share/ghostscript/fonts/a010013l.pfb:${PORTSDIR}/print/gsfonts
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-lib::cidfmap
+.endif
+
 ESPGS_VER=	${PORTVERSION}
 GS_VERSION=	8.15
 
@@ -37,6 +43,13 @@
 MAKE_ARGS=	CFLAGS_STANDARD="${CFLAGS} -DUPD_SIGNAL=0" \
 		DEVICE_DEVS="\$$(DD)cups.dev \$$(DD)pxlcolor.dev \$$(DD)pxlmono.dev"
 PLIST_SUB=	GS_VERSION="${GS_VERSION}"
+
+pre-everything::
+.if !defined(WITH_CJK)
+	@${ECHO_MSG} ""
+	@${ECHO_MSG} "Define WITH_CJK to enable Japanese PostScript documents processing"
+	@${ECHO_MSG} ""
+.endif
 
 pre-configure:
 	${RM} -f ${WRKSRC}/ijs/config.guess ${WRKSRC}/ijs/missing ${WRKSRC}/ijs/config.sub ${WRKSRC}/ijs/install-sh ${WRKSRC}/ijs/ltmain.sh
diff -urN ./files/extra-patch-lib::cidfmap ../cups-pstoraster/files/extra-patch-lib::cidfmap
--- ./files/extra-patch-lib::cidfmap	Thu Jan  1 03:00:00 1970
+++ ../cups-pstoraster/files/extra-patch-lib::cidfmap	Tue Apr 24 16:52:50 2007
@@ -0,0 +1,30 @@
+--- lib/cidfmap.orig	Thu Dec 29 04:56:24 2005
++++ lib/cidfmap	Mon Apr  9 00:47:56 2007
+@@ -26,3 +26,27 @@
+ %   /ShinGo-Bold   /HeiseiKakuGo-W5 ;
+ %   /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ;
+ %
++/Ryumin-Light << /FileType /TrueType /Path (Ryumin-Light.ttf) /SubfontID 0 /CSI [(Japan1) 3] >> ;
++/GothicBBB-Medium << /FileType /TrueType /Path (GothicBBB-Medium.ttf) /SubfontID 0 /CSI [(Japan1) 3] >> ;
++
++/HeiseiMin-W3		/Ryumin-Light ;
++%/HeiseiMin-W3		/WadaMin-Regular ;
++/HeiseiKakuGo-W5	/GothicBBB-Medium ;
++%/HeiseiKakuGo-W5	/WadaGo-Bold ;
++/FutoMinA101-Bold	/Ryumin-Light ;
++%/FutoMinA101-Bold	/WadaMin-Regular ;
++/FutoGoB101-Bold	/GothicBBB-Medium ;
++%/FutoGoB101-Bold	/WadaGo-Bold ;
++/Jun101-Light		/Ryumin-Light ;
++%/Jun101-Light		/WadaMin-Regular ;
++/MidashiGo-MB31		/GothicBBB-Medium ;
++%/MidashiGo-MB31	/WadaGo-Bold ;
++
++%/Munhwa-Regular	/Munhwa-Regular ;
++%/MunhwaGothic-Regular	/MunhwaGothic-Regular ;
++%/Munhwa-Bold		/Munhwa-Bold ;
++%/MunhwaGothic-Bold	/MunhwaGothic-Bold ;
++
++/HYGoThic-Medium	/MunhwaGothic-Regular ;
++/HYSMyeongJo-Medium	/Munhwa-Regular ;
++/HYRGoThic-Medium	/MunhwaGothic-Bold ;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1HkwxZ-0007q0-PT>