Add pcf2bdf(1.04), a converter X font from Portable Compiled

Format to Bitmap Distribution Format.

Obtained from:	NetBSD
This commit is contained in:
Norikatsu Shigemura 2003-01-20 14:27:51 +00:00
parent 4fb25c79cc
commit c57f9b6b1f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=73663
7 changed files with 67 additions and 0 deletions

View file

@ -31,6 +31,7 @@
SUBDIR += p5-Font-AFM
SUBDIR += p5-Font-TTF
SUBDIR += p5-type1inst
SUBDIR += pcf2bdf
SUBDIR += sgifonts
SUBDIR += sharefonts
SUBDIR += terminus-font

View file

@ -0,0 +1,27 @@
# New ports collection makefile for: pcf2bdf
# Date created: 2003/01/20
# Whom: nork@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= pcf2bdf
PORTVERSION= 1.04
CATEGORIES= x11-fonts
MASTER_SITES= http://www.tsg.ne.jp/GANA/S/pcf2bdf/
EXTRACT_SUFX= .tgz
MAINTAINER= nork@FreeBSD.org
NO_WRKSUBDIR= YES
MAN1= pcf2bdf.1
do-build:
${CXX} ${CXXFLAGS} -o ${WRKSRC}/pcf2bdf ${WRKSRC}/pcf2bdf.cc
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pcf2bdf ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/pcf2bdf.man ${PREFIX}/man/man1/pcf2bdf.1
.include <bsd.port.mk>

View file

@ -0,0 +1 @@
MD5 (pcf2bdf-1.04.tgz) = 8ce3b6a57491c67ef0cbf2f5413451f3

View file

@ -0,0 +1,29 @@
--- pcf2bdf.cc.orig Mon Oct 21 01:35:29 2002
+++ pcf2bdf.cc Mon Jan 20 23:11:46 2003
@@ -577,7 +577,7 @@
}
if (ifilename)
{
- ifp = fopen(ifilename, "rb");
+ ifp = fopen(ifilename, "r");
if (!ifp)
return error_exit("failed to open input pcf file");
}
@@ -595,7 +595,7 @@
fclose(ifp);
char buf[1024];
sprintf(buf, "gzip -dc %s", ifilename); // TODO
- ifp = popen(buf, "rb");
+ ifp = popen(buf, "r");
_setmode(fileno(ifp), O_BINARY);
read_bytes = 0;
if (!ifp)
@@ -604,7 +604,7 @@
if (ofilename)
{
- ofp = fopen(ofilename, "wb");
+ ofp = fopen(ofilename, "w");
if (!ofp)
return error_exit("failed to open output bdf file");
}

View file

@ -0,0 +1 @@
Convert X font from PCF to BDF

View file

@ -0,0 +1,7 @@
Pcf2bdf is a font de-compiler. It converts X fonts from Portable
Compiled Format (PCF) to Bitmap Distribution Format (BDF). It can
also accept a compressed/gzipped PCF file as input, but gzip must
be found in your PATH.
FONTBOUNDINGBOX in a BDF file is not used by bdftopcf, so pcf2bdf
generates irresponsible values.

View file

@ -0,0 +1 @@
bin/pcf2bdf