--- mknfonts.tool-0.5.orig/GNUmakefile +++ mknfonts.tool-0.5/GNUmakefile @@ -10,7 +10,7 @@ ADDITIONAL_OBJCFLAGS += -Wall -O2 ADDITIONAL_INCLUDE_DIRS += `freetype-config --cflags` -ADDITIONAL_LDFLAGS += `freetype-config --libs` +ADDITIONAL_TOOL_LIBS += `freetype-config --libs` mknfonts_OBJC_FILES = mknfonts.m --- mknfonts.tool-0.5.orig/debian/changelog +++ mknfonts.tool-0.5/debian/changelog @@ -0,0 +1,130 @@ +mknfonts.tool (0.5-11build4) bionic; urgency=medium + + * No-change rebuild for gnustep-base soname change. + + -- Matthias Klose Tue, 07 Nov 2017 06:37:55 +0000 + +mknfonts.tool (0.5-11build3) raring; urgency=low + + * Rebuild for gnustep-base 1.24 transition. + + -- Benjamin Drung Wed, 21 Nov 2012 15:21:29 +0100 + +mknfonts.tool (0.5-11build2) oneiric; urgency=low + + * Rebuild with GCC 4.6. + + -- Matthias Klose Sun, 14 Aug 2011 14:54:24 +0200 + +mknfonts.tool (0.5-11build1) natty; urgency=low + + * Rebuild for GNUstep transition. + + -- Luca Falavigna Sun, 24 Oct 2010 14:43:16 +0200 + +mknfonts.tool (0.5-11) unstable; urgency=low + + * debian/control (Standards-Version): Compliant with 3.8.4 (no changes + needed). + * debian/rules (OPTFLAG): No longer define; rework noopt handling to be + compatible with gnustep-make/2.4.x (Closes: #581962). + * debian/source/format: New file. + * debian/watch: Found it on ftp.gnustep.org; use that just in case. + + -- Yavor Doganov Sun, 30 May 2010 17:52:13 +0300 + +mknfonts.tool (0.5-10) unstable; urgency=low + + * debian/control (Maintainer): Adopt package; set to the GNUstep team + (Closes: #454446). + (Uploaders, Vcs-Arch): New fields. + (Build-Depends): Drop gnustep-make. Bump debhelper. Remove version + from libgnustep-base-dev. + (Section): Change to `gnustep'. + (Standards-Version): Set to 3.8.3 (no changes needed). + (Provides, Replaces, Conflicts): Remove. + * debian/compat: Set to 7. + * debian/rules: Use $(MAKE) instead of gs_make. + (LDFLAGS, OPTFLAG): Define. + (build-stamp): Pass messages=yes, OPTFLAG and LDFLAGS to make. + (install): Replace dh_clean -k with dh_prep. Don't invoke + dh_installdirs. + * debian/dirs: Delete. + * mknfonts.m (main): Don't delete the original font files; has a + devastating effect on the system when used as root with packaged font + files as arguments. + (-[FaceInfo collectFaceInfo]): Use GSPrintf instead of fprintf. + * GNUmakefile (ADDITIONAL_LDFLAGS): Rename as... + (ADDITIONAL_TOOL_LIBS): ...to make --as-needed trim zlib as well. + * debian/watch: New file (a stub). + + -- Yavor Doganov Thu, 03 Dec 2009 16:35:39 +0200 + +mknfonts.tool (0.5-9) unstable; urgency=medium + + * QA upload. + * Fix bashism in /bin/sh script (Closes: #480608) + * Migrate to Debhelper 5. + * Tidy debian/rules. + * debian/control: + - Bump Standards-Version to 3.8.0 + - Add ${misc:Depends} on binary package + - Tidy long description + + -- Chris Lamb Sat, 07 Jun 2008 22:51:10 +0100 + +mknfonts.tool (0.5-8) unstable; urgency=low + + * Orphaning package, setting maintainer to the Debian QA Group. + + -- Ana Beatriz Guerrero Lopez Fri, 07 Dec 2007 02:25:57 +0100 + +mknfonts.tool (0.5-7) unstable; urgency=low + + * GNUstep transition. + + -- Gürkan Sengün Fri, 05 Oct 2007 00:04:33 +0200 + +mknfonts.tool (0.5-6) unstable; urgency=low + + * Rebuild against latest libgnustep-base-dev. + * Bump standards version. + + -- Gürkan Sengün Sat, 16 Sep 2006 12:17:31 +0200 + +mknfonts.tool (0.5-5) unstable; urgency=low + + * Rebuild against latest libgnustep-base. (Closes: #350079) + * Update manual page, and move it to section 1. + * Bump standards version. + * Update update-nfonts. + + -- Gürkan Sengün Mon, 23 Jan 2006 12:33:22 +0100 + +mknfonts.tool (0.5-4) unstable; urgency=low + + * Fixed a bug in update-nfonts (catch the last n<14 fonts). + + -- Gürkan Sengün Wed, 8 Dec 2004 00:23:44 +0100 + +mknfonts.tool (0.5-3) unstable; urgency=low + + * Added update-nfonts script. + * Renamed source package to mknfonts.tool. + * Fixed debian/copyright. + * Updated debian/control build-depends for GNUstep. + + -- Gürkan Sengün Thu, 26 Aug 2004 00:34:45 +0200 + +mknfonts (0.5-2) unstable; urgency=low + + * Renamed binary package to mknfonts.tool + * Updated for latest gnustep + + -- Gürkan Sengün Fri, 30 Jul 2004 00:09:31 +0200 + +mknfonts (0.5-1) unstable; urgency=low + + * Initial Release. + + -- Gürkan Sengün Fri, 12 Mar 2004 18:00:35 +0100 --- mknfonts.tool-0.5.orig/debian/compat +++ mknfonts.tool-0.5/debian/compat @@ -0,0 +1 @@ +7 --- mknfonts.tool-0.5.orig/debian/control +++ mknfonts.tool-0.5/debian/control @@ -0,0 +1,21 @@ +Source: mknfonts.tool +Section: gnustep +Priority: optional +Maintainer: Debian GNUstep maintainers +Uploaders: Yavor Doganov +Build-Depends: debhelper (>= 7), + libgnustep-base-dev, + libfreetype6-dev +Standards-Version: 3.8.4 +Vcs-Arch: http://arch.debian.org/arch/pkg-gnustep/gnustep/mknfonts-tool--debian--1.0 + +Package: mknfonts.tool +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends} +Description: Create nfont packages for GNUstep + This doesn't completely automate the process of creating nfont-packages, + but it can do most of the bulk work for you. + . + This works with .ttf, .pfa, .pfb, .afm, most formats that freetype can handle + and provide postscript names for. --- mknfonts.tool-0.5.orig/debian/copyright +++ mknfonts.tool-0.5/debian/copyright @@ -0,0 +1,28 @@ +This package was debianized by Gürkan Sengün on +Fri, 12 Mar 2004 18:00:35 +0100. + +It was downloaded from http://wiki.gnustep.org/index.php/nfont%20packages + +Upstream Author: Alexander Malmberg + +License: + + Copyright (C) 2002 Alexander Malmberg + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU Library General +Public License 2 can be found in `/usr/share/common-licenses/LGPL-2'. --- mknfonts.tool-0.5.orig/debian/docs +++ mknfonts.tool-0.5/debian/docs @@ -0,0 +1 @@ +nfont_packages.txt --- mknfonts.tool-0.5.orig/debian/manpages +++ mknfonts.tool-0.5/debian/manpages @@ -0,0 +1,2 @@ +debian/mknfonts.1 +debian/update-nfonts.1 --- mknfonts.tool-0.5.orig/debian/mknfonts.1 +++ mknfonts.tool-0.5/debian/mknfonts.1 @@ -0,0 +1,26 @@ +.TH MKNFONTS 1 "March 12, 2004" +.SH NAME +mknfonts \- create nfont packages +.SH SYNOPSIS +.B mknfonts +.RI [ options ] " files" ... +.SH DESCRIPTION +This manual page documents briefly the +.B mknfonts +command. +This manual page was written for the Debian distribution +because the original program does not have a manual page. +.PP +\fBmknfonts\fP doesn't completely automate the process of creating nfont-packages, but it can do most of the bulk work for you. Just put a bunch of fonts (.ttf, .pfa, .pfb, .afm, ...; most formats that freetype can handle and provide postscript names for) in an empty directory and run: +.TP +mknfonts * +.TP +You'll get a bunch of packages ready to be moved to .../Library/Fonts/. For best results, you'll want to review the packages. Most traits/weights (besides the really standard ones) won't be handled automatically, so you'll have to add or tweak them manually if you want GNUstep to know about them. +.SH OPTIONS +These programs follow the usual GNU command line syntax, with long +options starting with two dashes (`-'). +.SH SEE ALSO +.BR GNUstep (7). +.SH AUTHOR +This manual page was written by G\[:u]rkan Seng\[:u]n , +for the Debian project (but may be used by others). --- mknfonts.tool-0.5.orig/debian/rules +++ mknfonts.tool-0.5/debian/rules @@ -0,0 +1,54 @@ +#!/usr/bin/make -f +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +include /usr/share/GNUstep/debian/config.mk + +export GNUSTEP_MAKEFILES := $(GS_MAKE_DIR) + +LDFLAGS := -Wl,-z,defs -Wl,--as-needed + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +optim := debug=yes +endif + +build: build-stamp +build-stamp: + dh_testdir + $(MAKE) $(optim) messages=yes LDFLAGS="$(LDFLAGS)" + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + $(MAKE) distclean + dh_clean + +install: build + dh_testdir + dh_testroot + dh_prep + $(MAKE) install DESTDIR=$(CURDIR)/debian/mknfonts.tool \ + GNUSTEP_INSTALLATION_DOMAIN=SYSTEM + cp update-nfonts $(CURDIR)/debian/mknfonts.tool/usr/bin + +binary-indep: + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installman + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- mknfonts.tool-0.5.orig/debian/source/format +++ mknfonts.tool-0.5/debian/source/format @@ -0,0 +1 @@ +1.0 --- mknfonts.tool-0.5.orig/debian/update-nfonts.1 +++ mknfonts.tool-0.5/debian/update-nfonts.1 @@ -0,0 +1,18 @@ +.TH UPDATE-NFONTS 1 "November 25, 2004" +.SH NAME +update-nfonts \- create nfonts from the systemfonts using symlinks +.SH SYNOPSIS +.B update-nfonts +.SH DESCRIPTION +This manual page documents briefly the +.B update-nfonts +command. +This manual page was written for the Debian distribution +because the original program does not have a manual page. +.PP +\fBupdate-nfonts\fP is a wrapper script around mknfonts. +.SH SEE ALSO +.BR GNUstep (7). +.SH AUTHOR +This manual page was written by G\[:u]rkan Seng\[:u]n , +for the Debian project (but may be used by others). --- mknfonts.tool-0.5.orig/debian/watch +++ mknfonts.tool-0.5/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=pasv \ +ftp://ftp.gnustep.org/pub/gnustep/dev-apps/mknfonts-(.*)\.tar\.gz --- mknfonts.tool-0.5.orig/mknfonts.m +++ mknfonts.tool-0.5/mknfonts.m @@ -140,7 +140,7 @@ FT_Face face; int i; const char *psname; - int foo,bar; + unsigned int foo,bar; for (i=1;i<[files count];i++) { @@ -158,21 +158,21 @@ if (FT_New_Face(ftlib,[[files objectAtIndex: 0] cString],0,&face)) { - fprintf(stderr,"unable to open %@, ignoring\n",[files objectAtIndex: 0]); + GSPrintf(stderr,@"unable to open %@, ignoring\n",[files objectAtIndex: 0]); return NO; } for (i=1;i<[files count];i++) { if (FT_Attach_File(face,[[files objectAtIndex: i] cString])) { - fprintf(stderr,"warning: unable to attach %@\n",[files objectAtIndex: i]); + GSPrintf(stderr,@"warning: unable to attach %@\n",[files objectAtIndex: i]); } } psname=FT_Get_Postscript_Name(face); if (!psname) { - fprintf(stderr,"couldn't get postscript name for %@, ignoring\n",[files objectAtIndex: 0]); + GSPrintf(stderr,@"couldn't get postscript name for %@, ignoring\n",[files objectAtIndex: 0]); return NO; } postScriptName=[[NSString alloc] initWithCString: psname]; @@ -182,7 +182,7 @@ if (traits_from_string(faceName,&foo,&bar)) { - fprintf(stderr,"warning: couldn't fully parse '%@' (%@)\n",faceName,postScriptName); + GSPrintf(stderr,@"warning: couldn't fully parse '%@' (%@)\n",faceName,postScriptName); } FT_Done_Face(face); @@ -284,7 +284,7 @@ NSFileManager *fm=[NSFileManager defaultManager]; NSEnumerator *e; NSString *family; - int i,c,j; + int i,c; NSMutableDictionary *family_info; NSMutableArray *faces; @@ -310,12 +310,6 @@ { fi=[faceinfos objectAtIndex: i]; [faces addObject: [fi faceInfoDictionary]]; - for (j=0;j<[fi->files count];j++) - { - [fm movePath: [fi->files objectAtIndex: j] - toPath: [path stringByAppendingPathComponent: [[fi->files objectAtIndex: j] lastPathComponent]] - handler: nil]; - } } [family_info --- mknfonts.tool-0.5.orig/nfont_packages.txt +++ mknfonts.tool-0.5/nfont_packages.txt @@ -0,0 +1,294 @@ +I've used [ ] to mark parts that aren't _really_ part of the spec, eg. +TODOs, undecided issues, and implementation notes. + + +.nfont packages +=============== + +[.nfont packages are used by back-art to load fonts (and may be used by +back-gslib as well, although that's undecided).] + + +An .nfont package (ie. a directory with the extension ".nfont") contains +a single, complete family. The directory contains a FontInfo.plist with +information about the family, and any files needed to render the faces +in the family, referenced from FontInfo.plist. FontInfo.plist contains a +dictionary. + +By default, the family name is the name of the font package (without the +.nfont extension), though an explicit Family key can change it. + +.nfont packages are located in Library/Fonts/ of any domain. When +searching for fonts, .nfont packages in the user domain override any +.nfont packages with the same name in the the local domain, which in turn +override any in the network domain, which override any in the system +domain. + + +The top-level dictionary +------------------------ + +The only required key in FontInfo.plist is "Faces", an array of faces in +the package. + + +Optional keys that are parsed are: + +Traits + Sets the default family traits. + +Weight + Sets the default family weight. + +Family + Sets the family name explicitly. + + +Other arbitrary keys can be added to provide more information, and their +values will be ignored, but since future changes might cause clashes, +it's recommended that the following be used: + +Version + A version number for the font _package_ (not the font files). When a new, + changed version of the font package is released (eg. with updated font + files, or just with changes to FontInfo.plist), this should be increased. + It is highly recommended that this key be included. + [TODO: Make it required? Define the format of the version number, and a + default number if the key is missing?] + +Foundry + The font's foundry. + +FontLicense + The license that the font files are covered by. + +FontCopyright + Copyright statement for the font files. + +[ +Ideas: + +License +Copyright + Copyright and license for FontInfo.plist. Necessary? + +Packager + Name and contact information of the person who created the .nfont package. + +Description + Free text description of the font. + +URL + +TODO: talk to fabien about the .nfont inspector +] + + +Faces +----- + +The Faces array contains a dictionary for each face. + +The font name (used eg. in [NSFont +fontWithName:size:]) is the value of +the PostScriptName key. The display name is formed by appending a space +and the localized face name to the family name. + + +Keys in the face dictionary: + +PostScriptName (required) + The face's postscript name. This is the name used as the face's name for + most internal purposes. + + +(exactly one of Name and LocalizedNames must be present) +Name + The face name, in English. The name will be automatically localized by + looking it up in a list of standard names and translations. This means + that new languages can be added in one place, and all faces will be + updated. It only works for certain standard names, but for those names, + this is the recommended way of specifying the face name. + [TODO + Define which names are 'standard'. Will include _really_ standard stuff + like "Bold", "Italic", "Regular", etc. + ] + +LocalizedNames + A dictionary that maps languages to localized face names. Each key is + a language name [like the ones you'd use for localized resources, etc.; + there should be docs about that], and the value is the name of the face + in that language. [If the user's preferred language can't be found, + "English" will be used if present, otherwise a random entry. TODO: match + behavior for LANGUAGES] + The dictionary should contain an entry for "English". Automatic trait + parsing won't work if there isn't an entry for "English". + [This needs a reference to some "How localization works" specs] + + +Files + An array of files to load for this face. (Technically, the first file is + loaded with FT_New_Face(), and subsequent files using FT_Attach_File(). + Thus, the main file (according to freetype) for the face needs to be + first. [In practice this means that the .pfa/.pfb file needs to come + before any .afm/.pfm files.]) + + By default, this is empty and there is no general way to render this font. + +ScreenFonts + A dictionary of (integer) pixel sizes, as strings, and the font files to + use for that size instead of the files specified in the Files key. Each + key is a size, in pixels. Each value is an array of files to load (just + like the value of the "Files" key). + +Traits + The traits of this face. + +Weight + The weight of this face. + +[TODO +Add a way to remove traits from the family traits? xor instead of or? +] + +[TODO +RenderHints_hack + A bit field with hints for the font renderer. This is a hack and needs to, + be cleaned up, but the format is (from back/Source/art/ftfont.m): + + hinting hints + 0: 1 to use the auto-hinter + 1: 1 to use hinting + byte 0 and 1 contain hinting hints for un-antialiased and antialiased + rendering, respectively. + + 16: 0=un-antialiased by default, 1=antialiased by default +] + + +Traits and weights +------------------ + +Weight values are integers 1<=x<=14. Lower is lighter, higher is heavier: + + 4 book + 5 regular + 6 medium + 9 bold + 11 heavy + +[There's a complete list in gui/Source/GSFontInfo.m, but I don't know how +much of this is 'standard' and how much is robust parsing in there.] + +The default family weight is 5. + +The weight of a face is determined from: + 1. An explicit "Weight" key in the face dictionary, if present. + 2. A weight determined from the face name, if possible. + 3. The family weight. + + +Trait values are combinations of the NS*FontMask flags in NSFontManager. +[Insert neat link to NSFont/NSFontManager traits/weight documentation.] + +The default family traits are 0. + +The traits of a face is the binary or of the face traits and the family +traits. If the face dictionary has an explicit "Traits" key, the face +traits get that value. If not, the face name is parsed to find the face +traits. If the parsing fails or doesn't find any traits in the name, the +face traits are 0. + + +[TODO: Specify how name parsing is done?] + + +Example FontInfo.plist +---------------------- + +An example of a normal FontInfo.plist for a family. + +Arial.nfont/FontInfo.plist +--- cut here --- +{ + Foundry = "Monotype"; + Faces = ( + { + Name = "Regular"; + PostScriptName = "ArialMT"; + Files = ("arial.ttf"); + RenderHints_hack = 0x00202; + }, + { + Name = "Bold"; + PostScriptName = "Arial-BoldMT"; + Files = ("arialbd.ttf"); + }, + { + LocalizedNames = { + English = "Rounded Bold"; + Swedish = "Rundad Fet"; + }; + PostScriptName = "ArialRoundedMTBold"; + Files = ("arlrdbd.ttf"); + } + ); + Version = 2; +} +--- cut here --- + + +An example of a package with an explicitly specified family name. + +Arial Narrow.nfont/FontInfo.plist +--- cut here --- +{ + Faces = ( + { + Files = ( + ArialNi.ttf + ); + Name = "Narrow Italic"; + PostScriptName = "ArialNarrow-Italic"; + }, + { + Files = ( + arialn.ttf + ); + Name = Narrow; + PostScriptName = ArialNarrow; + } + ); + Family = Arial; +} +--- cut here --- + +[ +TODO? + +.font packages +-------------- + +back-art also loads .font packages, though it's a bit late to specify them. +Since a .font package really only contains one face, it isn't a perfect +match, but it works. + +Traits and weights are determined by parsing the names. An .nfont package +in a later (or same) domain will override all .font packages for that family, +and .font packages in a later domain will override .nfont or .font packages +in an earlier domain (so all .font packages for a family need to be in the +same domain). +] + +-- +Author: Alexander Malmberg +Copyright 2002 Alexander Malmberg + +Thanks to: +Jeff Teunissen + +-- + +$Revision: 1.9 $ +$Date: 2002/10/01 16:47:27 $ + + --- mknfonts.tool-0.5.orig/update-nfonts +++ mknfonts.tool-0.5/update-nfonts @@ -0,0 +1,60 @@ +#!/bin/sh + +input=/usr/share/fonts/ +output=/usr/lib/GNUstep/System/Library/Fonts/ +# if non root user ~/GNUstep/Library/Fonts/ +if [ "`id`" != "`id root`" ]; then + mkdir -p ~/GNUstep/Library/Fonts/ + output=`echo ~/GNUstep/Library/Fonts/` +fi + +for z in ttf pfa pfb otf; do + cd $output + find $input -name "*.${z}" -type f -print | while read a; do + if test -f $a; then + bna=`basename "$a"` + echo "Preparing $bna for nfont" + ln -s "$a" "$bna" 2>/dev/null + fi + done +done +#symlinks -dv $output +c=0 +b="" +printf "Creating nfonts" +for z in ttf pfa pfb otf; do + for a in $z; do + b="$b *.${a}" + c=$((c+1)) + if test $c -eq 15; then + mknfonts $b 2>/dev/null + printf "." + b="" + c=0 + fi + done + mknfonts $b 2>/dev/null + echo +done +#cd + +exit + +#the bottom one is ugly and the top one too (but the top one is faster) +#and we need it until gnustep has the argumentlist limit removed. + +#!/bin/sh + +input=/usr/share/fonts/ +output=/usr/lib/GNUstep/System/Library/Fonts/ +mask="*.ttf" + +cd $output +find $input -name "$mask" -type f -print |while read a; do + ln -s "$a" "`basename "$a"`" 2>/dev/null +done +#symlinks -dv $output +for a in $mask; do + mknfonts "$a" +done +#cd