summaryrefslogtreecommitdiff
path: root/print/ghostscript-gnu-commfont/files
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript-gnu-commfont/files')
-rw-r--r--print/ghostscript-gnu-commfont/files/CIDFnmap.jp.in23
-rw-r--r--print/ghostscript-gnu-commfont/files/CIDFnmap.ko.in9
-rw-r--r--print/ghostscript-gnu-commfont/files/Makefile.in140
-rw-r--r--print/ghostscript-gnu-commfont/files/pkg-message.in14
-rw-r--r--print/ghostscript-gnu-commfont/files/template.cidfont.in10
-rw-r--r--print/ghostscript-gnu-commfont/files/template.font.in12
-rw-r--r--print/ghostscript-gnu-commfont/files/template.ttcidfont.in10
7 files changed, 186 insertions, 32 deletions
diff --git a/print/ghostscript-gnu-commfont/files/CIDFnmap.jp.in b/print/ghostscript-gnu-commfont/files/CIDFnmap.jp.in
deleted file mode 100644
index c658fc321e9b..000000000000
--- a/print/ghostscript-gnu-commfont/files/CIDFnmap.jp.in
+++ /dev/null
@@ -1,23 +0,0 @@
-% $FreeBSD$
-% Japanese Truetype Fonts
-/Default-Mincho (%%LOCALBASE%%/share/fonts/TrueType/ipam.ttf) 1 ;
-/Default-Gothic (%%LOCALBASE%%/share/fonts/TrueType/ipag.ttf) 1 ;
-
-%
-% Convenient aliases for PS files on Japanese PostScript printer
-%
-/Adobe-Japan1 /Default-Mincho ;
-/Ryumin-Light /Default-Mincho ;
-/Ryumin-Light-H /Default-Mincho ;
-/Ryumin-Light-V /Default-Mincho ;
-/GothicBBB-Medium /Default-Gothic ;
-/GothicBBB-Medium-H /Default-Gothic ;
-/GothicBBB-Medium-V /Default-Gothic ;
-/HeiseiMin-W3H /Default-Mincho ;
-/HeiseiKakuGo-W5H /Default-Gothic ;
-/FutoMinA101-Bold /Default-Mincho ;
-/FutoMinA101-Bold-H /Default-Mincho ;
-/FutoMinA101-Bold-V /Default-Mincho ;
-/FutoGoB101-Bold /Default-Gothic ;
-/FutoGoB101-Bold-H /Default-Gothic ;
-/FutoGoB101-Bold-V /Default-Gothic ;
diff --git a/print/ghostscript-gnu-commfont/files/CIDFnmap.ko.in b/print/ghostscript-gnu-commfont/files/CIDFnmap.ko.in
deleted file mode 100644
index 699de172aac1..000000000000
--- a/print/ghostscript-gnu-commfont/files/CIDFnmap.ko.in
+++ /dev/null
@@ -1,9 +0,0 @@
-% $FreeBSD$
-/Adobe-Korea1 /Munhwa-Regular ;
-
-%
-% Convenient aliases for PS files on Korean PostScript printer
-%
-/HYGoThic-Medium /MunhwaGothic-Regular ;
-/HYSMyeongJo-Medium /Munhwa-Regular ;
-/HYRGoThic-Medium /MunhwaGothic-Bold ;
diff --git a/print/ghostscript-gnu-commfont/files/Makefile.in b/print/ghostscript-gnu-commfont/files/Makefile.in
new file mode 100644
index 000000000000..8fd5e50f2477
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/Makefile.in
@@ -0,0 +1,140 @@
+# $FreeBSD$
+
+PREFIX?= /usr/local
+LOCALBASE?= /usr/local
+CMAPDIR?= ${LOCALBASE}/share/fonts/adobe-cmaps
+CIDFONTDIR?= ${LOCALBASE}/share/fonts/CIDFont
+GS_FONTDIR?= ${LOCALBASE}/share/ghostscript/fonts
+GS_RESFONTDIR?= ${LOCALBASE}/share/ghostscript/Resource/Font
+GS_RESCIDFONTDIR?= ${LOCALBASE}/share/ghostscript/Resource/CIDFont
+GS_RESCMAPDIR?= ${LOCALBASE}/share/ghostscript/Resource/CMap
+
+INSTALL_DATA?= install -m 444
+MKDIR?= mkdir -p
+LN?= ln
+FIND?= find
+AWK?= awk
+R?= 
+PROGRESS?= BEGIN { mark[0]=\"|\"; mark[1]=\"|\"; mark[2]=\"/\"; mark[3]=\"/\"; mark[4]=\"-\"; mark[5]=\"-\"; mark[6]=\"\\\\\"; mark[7]=\"\\\\\"; line = 0; } { line = (line + 1) % 8; printf(\"Generating virtual fonts...%s${R}\n\", mark[line]); }
+
+TEMPLATES_TTF= cs.serif cs.sansserif \
+ ct.serif cs.sansserif \
+ ja.serif ja.sansserif
+TEMPLATES_CID= ko.serif ko.sansserif
+
+CS.CMAPS= ac15
+
+CS.SERIF.GENERIC= STSong-Light
+CS.SERIF.GENERIC_SUBST= STSong-Light.ttf
+CS.SERIF= STSong-Light
+
+CS.SANSSERIF.GENERIC= STHeiti-Regular
+CS.SANSSERIF.GENERIC_SUBST= STHeiti-Regular.ttf
+CS.SANSSERIF= STHeiti-Regular
+
+CT.CMAPS= ag15
+
+CT.SERIF.GENERIC= MSung-Light
+CT.SERIF.GENERIC_SUBST= MSung-Light.ttf
+CT.SERIF= MSung-Light
+
+CT.SANSSERIF.GENERIC= MHei-Medium
+CT.SANSSERIF.GENERIC_SUBST= MHei-Medium.ttf
+CT.SANSSERIF= MHei-Medium
+
+JA.CMAPS= aj16 aj20
+
+JA.SERIF.GENERIC= Ryumin-Light
+JA.SERIF.GENERIC_SUBST= Ryumin-Light.ttf
+JA.SERIF= Ryumin-Light \
+ FutoMinA101-Bold \
+ HeiseiMin-W3
+
+JA.SANSSERIF.GENERIC= GothicBBB-Medium
+JA.SANSSERIF.GENERIC_SUBST= GothicBBB-Medium.ttf
+JA.SANSSERIF= GothicBBB-Medium \
+ FutoGoB101-Bold \
+ HeiseiKakuGo-W5 \
+ HGSSoeiKakugothicUB \
+ HGPSoeiKakugothicUB
+
+KO.CMAPS= ak12
+
+KO.SERIF.GENERIC= HYSMyeongJo-Medium
+KO.SERIF.GENERIC_SUBST= Munhwa-Regular
+KO.SERIF= HYSMyeongJo-Medium
+
+KO.SANSSERIF.GENERIC= HYGoThic-Medium
+KO.SANSSERIF.GENERIC_SUBST= MunhwaGothic-Regular
+KO.SANSSERIF= HYGoThic-Medium
+
+all:
+ @${MKDIR} CIDFont Font
+.for T in ${TEMPLATES_TTF}
+ @for F in ${${T:U}}; do \
+ echo "Generating CIDFont/$${F}"; \
+ sed -e "s,%%FONTNAME%%,$$F,g" \
+ -e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
+ -e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
+ -e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
+ < template.ttcidfont > CIDFont/$${F}; \
+ for D in ${${T:U:C/\.[^.]*$//}.CMAPS}; do \
+ if [ -d ${CMAPDIR}/$${D}/CMap ]; then \
+ CMAPS=`cd ${CMAPDIR}/$${D}/CMap; echo *`; \
+ elif [ -r ${CMAPDIR}/$${D} ]; then \
+ CMAPS=`basename $${D}`; \
+ else \
+ echo "$${D}: not found"; exit 1; \
+ fi; \
+ for C in $${CMAPS}; do \
+ echo "Generating Font/$${F}-$${C}"; \
+ sed -e "s,%%FONTNAME%%,$$F,g" \
+ -e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
+ -e "s,%%CMAPNAME%%,$${C}," \
+ -e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
+ -e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
+ < template.font > Font/$${F}-$${C}; \
+ done; \
+ done; \
+ done | awk "${PROGRESS}"
+.endfor
+.for T in ${TEMPLATES_CID}
+ @for F in ${${T:U}}; do \
+ echo "Generating CIDFont/$${F}"; \
+ sed -e "s,%%FONTNAME%%,$$F,g" \
+ -e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
+ -e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
+ -e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
+ < template.cidfont > CIDFont/$${F}; \
+ for D in ${${T:U:C/\.[^.]*$//}.CMAPS}; do \
+ if [ -d ${CMAPDIR}/$${D}/CMap ]; then \
+ CMAPS=`cd ${CMAPDIR}/$${D}/CMap; echo *`; \
+ elif [ -r ${CMAPDIR}/$${D} ]; then \
+ CMAPS=`basename $${D}`; \
+ else \
+ echo "$${D}: not found"; exit 1; \
+ fi; \
+ for C in $${CMAPS}; do \
+ echo "Generating Font/$${F}-$${C}"; \
+ sed -e "s,%%FONTNAME%%,$$F,g" \
+ -e "s,%%GS_FONTDIR%%,${GS_FONTDIR}," \
+ -e "s,%%CMAPNAME%%,$${C}," \
+ -e "s,%%GENERICFONTNAME%%,${${T:U}.GENERIC}," \
+ -e "s,%%GENERICFONTNAME_SUBST%%,${${T:U}.GENERIC_SUBST}," \
+ < template.font > Font/$${F}-$${C}; \
+ done; \
+ done; \
+ done | awk "${PROGRESS}"
+.endfor
+ @echo "Generating virtual fonts...done."
+
+install:
+ ${MKDIR} ${GS_RESCIDFONTDIR}
+ ${INSTALL_DATA} CIDFont/* ${GS_RESCIDFONTDIR}
+ ${MKDIR} ${GS_RESFONTDIR}
+ ${INSTALL_DATA} Font/* ${GS_RESFONTDIR}
+ ${MKDIR} ${GS_RESCMAPDIR}
+ cd ${GS_RESCMAPDIR} && ${LN} -s -f `${FIND} ${CMAPDIR} -type f` .
+.for T in ${TEMPLATES_CID}
+ cd ${GS_RESCIDFONTDIR} && ${LN} -s -f ${CIDFONTDIR}/${${T:U}.GENERIC_SUBST} ${${T:U}.GENERIC_SUBST}
+.endfor
diff --git a/print/ghostscript-gnu-commfont/files/pkg-message.in b/print/ghostscript-gnu-commfont/files/pkg-message.in
new file mode 100644
index 000000000000..f723d98e468d
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/pkg-message.in
@@ -0,0 +1,14 @@
+=== NOTE ===
+
+The CJK font selection will be performed in the following order:
+
+ 1. %%PREFIX%%/%%GS_RESDIR%%/Font/<fontname>
+
+ 2. %%PREFIX%%/%%GS_RESDIR%%/CIDFont/<fontname>
+
+ 3. %%PREFIX%%/share/ghostscript/%%PORTVERSION%%/lib/CIDFnmap
+
+So, to use CIDFnmap you have to make sure that there is no font file that
+has the same name as you want to customize in Resource/Font and
+Resource/CIDFont.
+
diff --git a/print/ghostscript-gnu-commfont/files/template.cidfont.in b/print/ghostscript-gnu-commfont/files/template.cidfont.in
new file mode 100644
index 000000000000..5d9dab648773
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/template.cidfont.in
@@ -0,0 +1,10 @@
+%!PS-Adobe-3.0 Resource-CIDFont
+%%Creator: $FreeBSD$
+%%BeginResource: CIDFont (%%FONTNAME%%)
+
+(%%FONTNAME%%)
+(%%GENERICFONTNAME_SUBST%%) /CIDFont findresource
+/CIDFont defineresource pop
+
+%%EndResource
+%%EOF
diff --git a/print/ghostscript-gnu-commfont/files/template.font.in b/print/ghostscript-gnu-commfont/files/template.font.in
new file mode 100644
index 000000000000..56a68caec658
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/template.font.in
@@ -0,0 +1,12 @@
+%!PS-Adobe-3.0 Resource-Font
+%%Creator: $FreeBSD$
+%%DocumentNeededResources: %%CMAPNAME%% (CMap)
+%%IncludeResource: %%CMAPNAME%% (CMap)
+%%BeginResource: Font (%%FONTNAME%%-%%CMAPNAME%%)
+(%%FONTNAME%%-%%CMAPNAME%%)
+(%%CMAPNAME%%) /CMap findresource
+[(%%GENERICFONTNAME%%) /CIDFont findresource]
+composefont
+pop
+%%EndResource
+%%EOF
diff --git a/print/ghostscript-gnu-commfont/files/template.ttcidfont.in b/print/ghostscript-gnu-commfont/files/template.ttcidfont.in
new file mode 100644
index 000000000000..bc10770f819f
--- /dev/null
+++ b/print/ghostscript-gnu-commfont/files/template.ttcidfont.in
@@ -0,0 +1,10 @@
+%!PS-Adobe-3.0 Resource-CIDFont
+%%Creator: $FreeBSD$
+%%BeginResource: CIDFont (%%FONTNAME%%)
+
+(%%FONTNAME%%)
+(%%GENERICFONTNAME_SUBST%%) findlibfile pop pop .openttcidfont
+/CIDFont defineresource pop
+
+%%EndResource
+%%EOF