Remove ttmkfdir, it has been replaced long ago by mkfontdir/mkfontscale
This commit is contained in:
parent
8bef511d9b
commit
c136e6a414
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=381966
14 changed files with 1 additions and 397 deletions
1
MOVED
1
MOVED
|
@ -7441,3 +7441,4 @@ devel/p5-Errno||2015-03-09|Errno is part of Perl
|
|||
devel/p5-Class-XSAccessor-Array||2015-03-09|Has been a part of devel/p5-Class-XSAccessor for >5 years. Use that port instead
|
||||
multimedia/ffmpeg25|multimedia/ffmpeg26|2015-03-14|ffmpeg upstream now points to 2.6.x series
|
||||
www/squid33|www/squid|2015-03-15|Has expired: Reached EOL on 28 August 2014, use www/squid (v3.4) instead
|
||||
x11-fonts/ttmkfdir|x11-fonts/mkfontdir|2015-03-22|Has been replaced by mkfontdir/mkfontscale long ago
|
||||
|
|
|
@ -162,7 +162,6 @@
|
|||
SUBDIR += tkfont
|
||||
SUBDIR += tlwg-ttf
|
||||
SUBDIR += tmu
|
||||
SUBDIR += ttmkfdir
|
||||
SUBDIR += tv-fonts
|
||||
SUBDIR += ubuntu-font
|
||||
SUBDIR += urwfonts
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
# Created by: Thomas Gellekum <tg@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ttmkfdir
|
||||
PORTVERSION= 3.0.9
|
||||
PORTREVISION= 3
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= x11-fonts
|
||||
MASTER_SITES= ${MASTER_SITE_GENTOO}/distfiles/ \
|
||||
http://www.skysmurf.nl/comp/FreeBSD/distfiles/
|
||||
|
||||
MAINTAINER= freebsd@skysmurf.nl
|
||||
COMMENT= Create fonts.scale file for use with TrueType font server
|
||||
|
||||
LICENSE= LGPL21
|
||||
|
||||
LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2
|
||||
|
||||
PLIST_FILES= bin/ttmkfdir
|
||||
USE_XORG= x11
|
||||
USES= gmake tar:bzip2
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/ttmkfdir ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -1,2 +0,0 @@
|
|||
SHA256 (ttmkfdir-3.0.9.tar.bz2) = c65f8e2ba5522c896df2eb7256852bf0a5855109deec0f874379474ef76c1c1c
|
||||
SIZE (ttmkfdir-3.0.9.tar.bz2) = 20160
|
|
@ -1,41 +0,0 @@
|
|||
--- Makefile.orig Mon Dec 9 19:07:14 2002
|
||||
+++ Makefile Wed Jul 19 11:35:12 2006
|
||||
@@ -16,7 +16,6 @@
|
||||
RELEASE=$(shell rpm -q --qf "%{release}\n" --specfile $(NAME).spec | head -1)
|
||||
|
||||
CVSTAG = r$(subst .,_,$(VERSION))
|
||||
-CVSROOT = $(shell cat CVS/Root)
|
||||
|
||||
# Autodetec the proper command used to build RPM packages
|
||||
RPMBUILD=$(shell [ -x /usr/bin/rpmbuild ] && echo rpmbuild || echo rpm)
|
||||
@@ -24,11 +23,8 @@
|
||||
FREETYPE_INCL=$(shell freetype-config --cflags)
|
||||
FREETYPE_LIB=$(shell freetype-config --libs)
|
||||
|
||||
-OPTFLAGS=
|
||||
-DEBUG=-ggdb
|
||||
-CXX=g++
|
||||
-CXXFLAGS=-Wall -pedantic $(FREETYPE_INCL) $(DEBUG) $(OPTFLAGS)
|
||||
-LDFLAGS=$(FREETYPE_LIB) $(DEBUG)
|
||||
+CXXFLAGS+=-Wall $(FREETYPE_INCL)
|
||||
+LDFLAGS+=$(FREETYPE_LIB) -lz
|
||||
|
||||
DESTDIR=
|
||||
PREFIX=/usr
|
||||
@@ -39,13 +35,13 @@
|
||||
all: ttmkfdir
|
||||
|
||||
.cpp.o:
|
||||
- libtool --mode=compile $(CXX) $(CXXFLAGS) -o $@ -c $^
|
||||
+ $(CXX) $(CXXFLAGS) -o $@ -c $^
|
||||
|
||||
ttmkfdir: ttmkfdir.o directory.o commandline.o ttf.o encoding.o parser.o builtin.o
|
||||
- libtool --mode=link $(CXX) -o $@ $^ $(LDFLAGS)
|
||||
+ $(CXX) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
parser.cpp: encoding.l
|
||||
- flex -i -8 -o$@ $<
|
||||
+ lex -i -8 -o$@ $<
|
||||
|
||||
install:
|
||||
mkdir -p $(DESTDIR)$(BINDIR)
|
|
@ -1,11 +0,0 @@
|
|||
--- builtin.cpp.orig Mon Jan 13 04:11:10 2003
|
||||
+++ builtin.cpp Wed Jul 19 11:27:41 2006
|
||||
@@ -600,7 +600,7 @@
|
||||
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
|
||||
};
|
||||
|
||||
-};
|
||||
+}
|
||||
|
||||
Encoding::BuiltinEncoding_t Encoding::builtin_encodings[] = {
|
||||
{256,191,32,{TT_PLATFORM_MICROSOFT,TT_MS_ID_UNICODE_CS,iso8859_1},{"iso8859-1",}},
|
|
@ -1,47 +0,0 @@
|
|||
--- directory.cpp.orig 2002-12-09 03:29:11.000000000 -0500
|
||||
+++ directory.cpp
|
||||
@@ -1,7 +1,10 @@
|
||||
#include <cctype>
|
||||
#include <dirent.h>
|
||||
+#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
+#include <fcntl.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "directory.h"
|
||||
|
||||
@@ -37,19 +40,24 @@ directory::select (const char *name) con
|
||||
bool
|
||||
ttfdirectory::select (const char *name) const
|
||||
{
|
||||
- int len;
|
||||
+ int fd;
|
||||
+ unsigned int n;
|
||||
struct stat buf;
|
||||
+ char sigdata[8];
|
||||
+ char TTsig[] = "\000\001\000\000\000", OTsig[] = "OTTO";
|
||||
|
||||
/* must be a regular file */
|
||||
if (::stat (name, &buf) || !(S_ISREG (buf.st_mode))) {
|
||||
return false;
|
||||
}
|
||||
-
|
||||
- /* we make the decision by the extension of the file name */
|
||||
- return (((len = strlen (name)) > 4) &&
|
||||
- (name[len - 4] == '.') &&
|
||||
- (std::toupper(name[len - 3]) == 'T') &&
|
||||
- (std::toupper(name[len - 2]) == 'T') &&
|
||||
- ((std::toupper(name[len - 1]) == 'F') ||
|
||||
- (std::toupper(name[len - 1]) == 'C')));
|
||||
+
|
||||
+ fd = ::open(name, O_RDONLY);
|
||||
+ if (fd < 0) return false;
|
||||
+ n = read(fd, sigdata, sizeof(sigdata));
|
||||
+ close(fd);
|
||||
+ if (n < sizeof(sigdata))
|
||||
+ return false;
|
||||
+
|
||||
+ return (!memcmp(sigdata, TTsig, 5)
|
||||
+ || !memcmp(sigdata, OTsig, 4));
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
--- encoding.cpp.orig Wed Jul 19 11:30:05 2006
|
||||
+++ encoding.cpp Wed Jul 19 11:30:28 2006
|
||||
@@ -2,7 +2,9 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
-#include "freetype/freetype.h"
|
||||
+#include <unistd.h>
|
||||
+#include <zlib.h>
|
||||
+#include <ft2build.h>
|
||||
|
||||
#include "ttmkfdir.h"
|
||||
#include "encoding.h"
|
||||
@@ -32,9 +34,16 @@
|
||||
NextFile (FILE *f, char *name)
|
||||
{
|
||||
char file_name [1024];
|
||||
- char command[1024];
|
||||
+ char line_buf [1024];
|
||||
+ char tmp_file_name[] = "/tmp/ttmkfdir_XXXXXX";
|
||||
+ char inbuf[300000];
|
||||
+ FILE *od;
|
||||
+ gzFile fd;
|
||||
+ int rvalue, tmpfd;
|
||||
|
||||
- if (fscanf (f, "%*s %[^\n]\n", file_name) == 1) {
|
||||
+ if (fgets (line_buf, sizeof(line_buf), f) != NULL) {
|
||||
+
|
||||
+ sscanf (line_buf, "%*s %[^\n]\n", file_name);
|
||||
|
||||
if (file_name[0] == '/') {
|
||||
name[0] = 0;
|
||||
@@ -44,9 +53,25 @@
|
||||
|
||||
strcat (name, file_name);
|
||||
|
||||
- sprintf (command, "exec %s < %s", (toupper(name[strlen (name) - 1]) == 'Z')
|
||||
- ? "gzip -d" : "cat", name);
|
||||
- return popen (command, "r");
|
||||
+ bzero(inbuf, sizeof(inbuf));
|
||||
+
|
||||
+ fd = gzopen (name,"rb");
|
||||
+ rvalue = gzread (fd, inbuf, sizeof(inbuf));
|
||||
+
|
||||
+ tmpfd = mkstemp (tmp_file_name);
|
||||
+ if (tmpfd == -1) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ od = fdopen (tmpfd,"w");
|
||||
+ fputs (inbuf, od);
|
||||
+ fflush (od);
|
||||
+ fclose (od);
|
||||
+
|
||||
+ od = fopen (tmp_file_name,"r");
|
||||
+ unlink (tmp_file_name);
|
||||
+ return od;
|
||||
+
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -75,7 +100,7 @@
|
||||
yyrestart (input);
|
||||
yylex (name, *this);
|
||||
|
||||
- pclose (input);
|
||||
+ fclose (input);
|
||||
}
|
||||
|
||||
fclose (f);
|
||||
@@ -97,7 +122,7 @@
|
||||
|
||||
NumericMapping *m = new NumericMapping (size, b->mapdata.platform, b->mapdata.encoding);
|
||||
|
||||
- for (int i = 0; i < size; i++)
|
||||
+ for (unsigned int i = 0; i < size; i++)
|
||||
(*m)[i] = b->mapdata.mappingtable[i];
|
||||
|
||||
AddMapping (m);
|
|
@ -1,12 +0,0 @@
|
|||
--- encoding.h.orig Tue Mar 12 15:41:27 2002
|
||||
+++ encoding.h Sun Mar 21 22:35:15 2004
|
||||
@@ -6,7 +6,8 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
-#include "freetype/freetype.h"
|
||||
+#include <ft2build.h>
|
||||
+#include FT_FREETYPE_H
|
||||
|
||||
#include "util.h"
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
--- encoding.l.orig Wed Jul 19 11:39:18 2006
|
||||
+++ encoding.l Wed Jul 19 11:39:22 2006
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "ttmkfdir.h"
|
||||
#include "encoding.h"
|
||||
|
||||
-#define DEFAULT_SIZE 0x100 /* 8 bit encoding */
|
||||
+#define DEFAULT_SIZE 0xFFFF /* 8 bit encoding */
|
||||
#define YY_DECL int yylex (char *current_file, Encodings_t &dest)
|
||||
|
||||
static unsigned int line_number = 1;
|
||||
@@ -43,6 +43,7 @@
|
||||
STARTENCODING{WHITESPACES}{STRING} {
|
||||
cur_enc = new Encoding;
|
||||
cur_enc->names.push_back (strip_first (yytext));
|
||||
+ cur_enc->size = DEFAULT_SIZE;
|
||||
BEGIN(INSIDE_ENC_BLOCK);
|
||||
}
|
||||
|
||||
@@ -97,6 +98,7 @@
|
||||
<INSIDE_MAP_BLOCK>UNDEFINE{WHITESPACES}{NUMBER}({WHITESPACES}{NUMBER})? {
|
||||
char *startptr = strip_first (yytext);
|
||||
char *endptr;
|
||||
+ long msize = cur_map->size();
|
||||
|
||||
int i1 = std::strtol (startptr, &endptr, 0);
|
||||
startptr = endptr;
|
||||
@@ -108,13 +110,14 @@
|
||||
}
|
||||
|
||||
/* now mark all the unassigned codes */
|
||||
- for (long i = i1; i <= i2; i++) {
|
||||
+ for (long i = i1; i <= i2 && i < msize; i++) {
|
||||
(*cur_map)[i] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
<INSIDE_MAP_BLOCK>{NUMBER}({WHITESPACES}{NUMBER}){0,2} {
|
||||
- int numbers[3], i = 0, start_range, end_range, target, res;
|
||||
+ int numbers[3], target, res;
|
||||
+ unsigned int i = 0, start_range, end_range;
|
||||
char *startptr;
|
||||
char *endptr = yytext;
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
--- ttf.cpp.orig 2003-01-08 06:25:25.000000000 +0100
|
||||
+++ ttf.cpp 2013-12-17 00:08:13.000000000 +0100
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
|
||||
-#include "freetype/tttables.h"
|
||||
+#include <ft2build.h>
|
||||
+#include FT_TRUETYPE_TABLES_H
|
||||
#include "ttmkfdir.h"
|
||||
#include "ttf.h"
|
||||
#include "ttos2val.h"
|
||||
@@ -51,20 +52,27 @@
|
||||
bool
|
||||
Face::MappingPresent (int cmapidx, NumericMapping *m, int enc_size, int start_code, bool enc_comp)
|
||||
{
|
||||
- int idx, missing = 0;
|
||||
+ int idx;
|
||||
+ unsigned int missing = 0, bail_at, msize;
|
||||
+
|
||||
FT_Set_Charmap (face, face->charmaps[cmapidx]);
|
||||
|
||||
- for (unsigned int i = start_code; i < m->size (); i++) {
|
||||
+ msize = m->size();
|
||||
+ if (enc_size <= 256) {
|
||||
+ bail_at = int (cmdline::instance()->option ("max-missing"));
|
||||
+ } else {
|
||||
+ bail_at = ((int (cmdline::instance()->option ("max-missing-percentage"))
|
||||
+& enc_comp)*enc_size)/100;
|
||||
+ }
|
||||
+
|
||||
+ for (unsigned int i = start_code; i < msize && missing < bail_at; i++) {
|
||||
if ((*m)[i] < 0)
|
||||
continue;
|
||||
if ((idx = FT_Get_Char_Index (face, (*m)[i])) == 0)
|
||||
missing++;
|
||||
}
|
||||
- if (enc_size <= 256) {
|
||||
- return (missing <= int (cmdline::instance()->option ("max-missing")));
|
||||
- } else {
|
||||
- return ((100 * missing/enc_size) <= int (cmdline::instance()->option ("max-missing-percentage")) & enc_comp);
|
||||
- }
|
||||
+
|
||||
+ return missing < bail_at;
|
||||
}
|
||||
|
||||
Face::Face (const std::string &filename)
|
||||
@@ -239,7 +247,7 @@
|
||||
for (i = 0; i < n; i++) {
|
||||
if ((fterror = FT_Get_Sfnt_Name (face, i, &NamePtr)) != FT_Err_Ok) {
|
||||
std::cout << "Warning: Can't SFNT name : " << FileName << "(" << fterror << ")" << std::endl;
|
||||
- return;
|
||||
+ return NULL;
|
||||
};
|
||||
platform = NamePtr.platform_id;
|
||||
encoding = NamePtr.encoding_id;
|
||||
@@ -483,7 +491,7 @@
|
||||
const char *
|
||||
Face::PanoseWeight (void) const
|
||||
{
|
||||
- static char *panose_weight_latin[] = {
|
||||
+ static const char *panose_weight_latin[] = {
|
||||
"any",
|
||||
"no fit",
|
||||
"very light",
|
||||
@@ -548,7 +556,7 @@
|
||||
const char *
|
||||
Face::PanoseWidth (void) const
|
||||
{
|
||||
- static char *panose_spacing_latin_text [] = {
|
||||
+ static const char *panose_spacing_latin_text [] = {
|
||||
"any",
|
||||
"no fit",
|
||||
"old style",
|
||||
@@ -561,7 +569,7 @@
|
||||
"monospaced",
|
||||
};
|
||||
|
||||
- static char *panose_spacing_latin_decorative [] = {
|
||||
+ static const char *panose_spacing_latin_decorative [] = {
|
||||
"any",
|
||||
"no fit",
|
||||
"super condensed",
|
|
@ -1,37 +0,0 @@
|
|||
--- ttf.h.orig Wed Jul 19 11:36:47 2006
|
||||
+++ ttf.h Wed Jul 19 11:36:50 2006
|
||||
@@ -3,16 +3,19 @@
|
||||
#define TTF_H__
|
||||
|
||||
#include <string>
|
||||
-#include "freetype/freetype.h"
|
||||
-#include "freetype/tttables.h"
|
||||
-#include "freetype/ftsnames.h"
|
||||
-#include "freetype/ttnameid.h"
|
||||
-#include "freetype/fterrors.h"
|
||||
-#include "freetype/ftmodule.h"
|
||||
+#include <ft2build.h>
|
||||
+#include FT_FREETYPE_H
|
||||
+#include FT_TRUETYPE_TABLES_H
|
||||
+#include FT_SFNT_NAMES_H
|
||||
+#include FT_TRUETYPE_IDS_H
|
||||
+#include FT_ERRORS_H
|
||||
+#include FT_MODULE_H
|
||||
|
||||
#include "util.h"
|
||||
#include "encoding.h"
|
||||
|
||||
+using namespace std;
|
||||
+
|
||||
namespace ttf {
|
||||
|
||||
class Face {
|
||||
@@ -49,7 +52,7 @@
|
||||
TT_Postscript *post;
|
||||
std::string FileName;
|
||||
};
|
||||
-};
|
||||
+}
|
||||
|
||||
#endif /* TTF_H__ */
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- util.h.orig Mon Dec 9 11:29:11 2002
|
||||
+++ util.h Wed Jul 19 11:27:37 2006
|
||||
@@ -17,6 +17,6 @@
|
||||
Singleton (void) {};
|
||||
~Singleton (void) {};
|
||||
};
|
||||
-};
|
||||
+}
|
||||
|
||||
#endif // TTMKFDIRUTIL_H__
|
|
@ -1,4 +0,0 @@
|
|||
This program reads TrueType fonts and creates a
|
||||
suitable fonts.scale file for use with an X font server.
|
||||
|
||||
WWW: http://people.redhat.com/yshao/
|
Loading…
Reference in a new issue