Commit da84af9e authored by William Jon McCann's avatar William Jon McCann

Initial checkin

parents
Copyright (c) 2009-2010, Dave Crossland (dave@lab6.com),
with Reserved Font Name Cantarell.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
SUBDIRS = src fontconfig
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
config.guess \
config.h.in \
config.sub \
configure \
depcomp \
install-sh \
intltool-*.in \
libtool \
ltmain.sh \
missing \
mkinstalldirs
-include $(top_srcdir)/git.mk
FONTLOG for Cantarell beta release
===================================
This file provides detailed information on the Cantarell font
software. This information should be distributed along with the
Cantarell fonts and any derivative works.
Font Information
-------------------------
The Cantarell typeface family was designed during my study of MA
Typeface Design [1] in the Department of Typography at the University
of Reading (UK). Its homepage is http://abattis.org/cantarell
The typeface is designed as a contemporary Humanist sans serif, and
was developed for on-screen reading; in particular, reading web pages
on an HTC Dream mobile phone [2].
That device runs Google Android [3], and therefore has a web browser
supporting the exciting new web fonts feature known as @font-face
[4]. As my very first typeface design, the typeface has many faults,
yet it achieves the goal of improving readability on this device.
Each font file currently contains 391 glyphs, and fully support the
following writing systems: Basic Latin, Western European, Catalan,
Baltic, Turkish, Central European, Dutch and Afrikaans. To date, Pan
African Latin has only 33% glyph coverage.
Since the design is aimed at display on-screen at small sizes, the
printed output (especially of the bold and oblique) may not work
well. I hope to publish a set of fonts tuned to the needs of printing
in the future.
This highlights my motivation for undertaking a study of typeface
design: I believe it is essential that when we use digital tools, our
freedom to use, understand, modify and share these tools is
respected. Otherwise, when the tool does not work in the way that we
need, we will be unable to fix it.
These fonts were developed using only such software, mainly FontForge
[5]. Typeface designs are tools too, and therefore these font files
are licensed in a way that respects your freedom—you are invited to
extend them to meet your needs, such as to add the glyphs missing from
your own writing systems, under the terms of the GNU General Public
License [6].
If you like this typeface and would like to support its continuing
development, you can buy a subscription at £5/month:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6676497
Comments are most welcome – dave@lab6.com
- Dave Crossland, 6th July 2009
[1]: http://www.typedesign.reading.ac.uk
[2]: http://en.wikipedia.org/wiki/HTC_Dream
[3]: http://en.wikipedia.org/wiki/Android_%28operating_system%29
[4]: http://openfontlibrary.org/wiki/Web_font_linking_with_%40font-face
[5]: http://fontforge.sf.net
[6]: http://www.gnu.org/copyleft/gpl.html
* * *
This ZIP files contains the TTF fonts you can use on your desktop, and
the source files you can modify. You may upload these fonts to your
website, and for that I include EOT files for compatibility with
Microsoft Internet Explorer.
Simply add the following lines to your CSS stylesheets, and place the
EOT and TTF files in the same directory:
/* Just add the "cantarell" class to HTML elements you wish to use this typeface */
@font-face {font-family:Cantarell; src:url("Cantarell-Regular.eot");}
@font-face {font-family:Cantarell; src:url("Cantarell-Oblique.eot"); font-style:italic;}
@font-face {font-family:Cantarell; src:url("Cantarell-Bold.eot"); font-weight:bold;}
@font-face {font-family:Cantarell; src:url("Cantarell-BoldOblique.eot"); font-weight:bold; font-style:italic;}
@font-face {font-family:Cantarell; src:url("Cantarell-Regular.ttf");}
@font-face {font-family:Cantarell; src:url("Cantarell-Oblique.ttf"); font-style:italic;}
@font-face {font-family:Cantarell; src:url("Cantarell-Bold.ttf"); font-weight:bold;}
@font-face {font-family:Cantarell; src:url("Cantarell-BoldOblique.ttf"); font-weight:bold; font-style:italic;}
.cantarell {font-family:Cantarell, sans-serif; line-height:1.8em;}
NOTE: You can significantly speed up your page loading times by only
including the Regular font. Web browsers will generate bold and
oblique members of the typeface family from the regular when they are
needed. This does not work as well for serif designs, but is fine
for a sans serif typeface like Cantarell.
The original Spiro source file is the _master_ source, and from it
the other files in the family were generated; the regular by
converting the Spiro curves to PostScript cubic Bezier curves, and
then to TrueType quadratic Bezier curves, and the others by
performing bold and oblique machine-transformations with FontForge on
the Bezier curve version. I will soon publish a "Reflection on
Practice" document on the abattis.org/cantarell website that will
explain this process in detail.
The EOT files were generated with http://code.google.com/p/ttf2eot/
and have no root string restrictions or compression.
ChangeLog
-------------------------
Here is a list of major and minor changes, most recent first.
6 July 2009 (Dave Crossland) Cantarell Version 1.001
- Initial release of font as "Cantarell"
Acknowledgements
-------------------------
Here is a list of contributors.
If you make modifications be sure to add your name (N), email (E),
web-address (W) and description (D). This list is sorted by last name
in alphabetical order.
N: Dave Crossland
E: dave@lab6.com
W: http://abattis.org/cantarell/
D: Designer - original Latin glyphs
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="cantarell-fonts"
REQUIRED_AUTOMAKE_VERSION=1.9
(test -f $srcdir/configure.ac \
&& test -d $srcdir/src) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
(cd $srcdir && autoreconf --force --install) || exit 1
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:gnome="http://api.gnome.org/doap-extensions#"
xmlns="http://usefulinc.com/ns/doap#">
<name xml:lang="en">Cantarell Fonts</name>
<shortdesc xml:lang="en">Cantarell, a Humanist sans-serif font family</shortdesc>
<download-page rdf:resource="http://download.gnome.org/sources/cantarell-fonts/" />
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=cantarell-fonts" />
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />
<maintainer>
<foaf:Person>
<foaf:name>Dave Crossland</foaf:name>
<foaf:mbox rdf:resource="mailto:dave@lab6.com" />
</foaf:Person>
</maintainer>
<maintainer>
<foaf:Person>
<foaf:name>William Jon McCann</foaf:name>
<foaf:mbox rdf:resource="mailto:william.jon.mccann@gmail.com" />
<gnome:userid>mccann</gnome:userid>
</foaf:Person>
</maintainer>
</Project>
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53)
AC_INIT([cantarell-fonts], [0.0.1],
[http://bugzilla.gnome.org/enter_bug.cgi?product=cantarell-fonts])
AM_INIT_AUTOMAKE([1.9 tar-ustar foreign dist-bzip2 no-dist-gzip])
PKG_PROG_PKG_CONFIG([0.19])
AC_PROG_SED
# Workaround to make aclocal get the right flags
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
AC_CONFIG_FILES([
Makefile
fontconfig/Makefile
src/Makefile
])
AC_OUTPUT
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<!--
Define aliasing and other fontconfig settings for Cantarell.
-->
<fontconfig>
<!-- Generic name assignment -->
<alias>
<family>Cantarell</family>
<default>
<family>sans-serif</family>
</default>
</alias>
<!-- Generic name aliasing -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Cantarell</family>
</prefer>
</alias>
</fontconfig>
configdir = $(datadir)/fontconfig/conf.avail/
config_DATA = \
57-cantarell.conf
EXTRA_DIST = $(config_DATA)
-include $(top_srcdir)/git.mk
# git.mk
#
# Copyright 2009, Red Hat, Inc.
# Written by Behdad Esfahbod
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#
# The canonical source for this file is pango/git.mk, or whereever the
# header of pango/git.mk suggests in the future.
#
# To use in your project, import this file in your git repo's toplevel,
# then do "make -f git.mk". This modifies all Makefile.am files in
# your project to include git.mk.
#
# This enables automatic .gitignore generation. If you need to ignore
# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
# But think twice before doing that. If a file has to be in .gitignore,
# chances are very high that it's a generated file and should be in one
# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
#
# The only case that you need to manually add a file to GITIGNOREFILES is
# when remove files in one of mostlyclean-local, clean-local, distclean-local,
# or maintainer-clean-local.
#
# Note that for files like editor backup, etc, there are better places to
# ignore them. See "man gitignore".
#
# If "make maintainer-clean" removes the files but they are not recognized
# by this script (that is, if "git status" shows untracked files still), send
# me the output of "git status" as well as your Makefile.am and Makefile for
# the directories involved.
#
# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
# pango/Makefile.am.
#
# Don't EXTRA_DIST this file. It is supposed to only live in git clones,
# not tarballs. It serves no useful purpose in tarballs and clutters the
# build dir.
#
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
# gnome-doc-utils, intltool.
#
#
# KNOWN ISSUES:
#
# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
# submodule doesn't find us. If you have configure.{in,ac} files in
# subdirs, add a proxy git.mk file in those dirs that simply does:
# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste.
# And add those files to git. See vte/gnome-pty-helper/git.mk for
# example.
#
git-all: git-mk-install
git-mk-install:
@echo Installing git makefile
@any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
if grep 'include .*/git.mk' $$x >/dev/null; then \
echo $$x already includes git.mk; \
else \
failed=; \
echo "Updating $$x"; \
{ cat $$x; \
echo ''; \
echo '-include $$(top_srcdir)/git.mk'; \
} > $$x.tmp || failed=1; \
if test x$$failed = x; then \
mv $$x.tmp $$x || failed=1; \
fi; \
if test x$$failed = x; then : else \
echo Failed updating $$x; >&2 \
any_failed=1; \
fi; \
fi; done; test -z "$$any_failed"
.PHONY: git-all git-mk-install
### .gitignore generation
$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
$(AM_V_GEN) \
{ \
if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
for x in \
$(DOC_MODULE)-decl-list.txt \
$(DOC_MODULE)-decl.txt \
tmpl/$(DOC_MODULE)-unused.sgml \
"tmpl/*.bak" \
xml html \
; do echo /$$x; done; \
fi; \
if test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
for x in \
$(_DOC_C_DOCS) \
$(_DOC_LC_DOCS) \
$(_DOC_OMF_ALL) \
$(_DOC_DSK_ALL) \
$(_DOC_HTML_ALL) \
$(_DOC_POFILES) \
"*/.xml2po.mo" \
"*/*.omf.out" \
; do echo /$$x; done; \
fi; \
if test -f $(srcdir)/po/Makefile.in.in; then \
for x in \
po/Makefile.in.in \
po/Makefile.in \
po/Makefile \
po/POTFILES \
po/stamp-it \
po/.intltool-merge-cache \
"po/*.gmo" \
"po/*.mo" \
po/$(GETTEXT_PACKAGE).pot \
intltool-extract.in \
intltool-merge.in \
intltool-update.in \
; do echo /$$x; done; \
fi; \
if test -f $(srcdir)/configure; then \
for x in \
autom4te.cache \
configure \
config.h \
stamp-h1 \
libtool \
config.lt \
; do echo /$$x; done; \
fi; \
for x in \
.gitignore \
$(GITIGNOREFILES) \
$(CLEANFILES) \
$(PROGRAMS) \
$(check_PROGRAMS) \
$(EXTRA_PROGRAMS) \
$(LTLIBRARIES) \
so_locations \
.libs _libs \
$(MOSTLYCLEANFILES) \
"*.$(OBJEXT)" \
"*.lo" \
$(DISTCLEANFILES) \
$(am__CONFIG_DISTCLEAN_FILES) \
$(CONFIG_CLEAN_FILES) \
TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
"*.tab.c" \
$(MAINTAINERCLEANFILES) \
$(BUILT_SOURCES) \
$(DEPDIR) \
Makefile \
Makefile.in \
"*.orig" \
"*.rej" \
"*.bak" \
"*~" \
".*.sw[nop]" \
; do echo /$$x; done; \
} | \
sed "s@^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
sed 's@/[.]/@/@g' | \
LC_ALL=C sort | uniq > $@.tmp && \
mv $@.tmp $@;
all: $(srcdir)/.gitignore gitignore-recurse-maybe
gitignore-recurse-maybe:
@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
$(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
fi;
gitignore-recurse:
@for subdir in $(DIST_SUBDIRS); do \
case " $(SUBDIRS) " in \
*" $$subdir "*) :;; \
*) test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir");; \
esac; \
done
gitignore: $(srcdir)/.gitignore gitignore-recurse
maintainer-clean: gitignore-clean
gitignore-clean:
-rm -f $(srcdir)/.gitignore
.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
#!/usr/bin/env fontforge
if ($version < "20080330")
Error("Your version of FontForge is too old - 20080330 or newer is required");
endif
SetPref("FoundryName", "Cantarell")
SetPref("TTFFoundry", "Cantarell")
i = 1
while (i < $argc)
Open($argv[i], 1)
Generate($fontname + ".ttf")
PrintSetup (5)
PrintFont (0, 0, "", $fontname + "-sample.pdf")
Close()
i++
endloop
#!/usr/bin/perl -w
# $Id: langcover.pl 2343 2009-03-08 12:42:25Z moyogo $
# language coverage analyzator
# (c)2006 Stepan Roh (PUBLIC DOMAIN)
# usage: ./langcover.pl fc-lang_dir sfd_file1 label1 (sfd_file2 label2...)
# files from http://webcvs.freedesktop.org/fontconfig/fontconfig/fc-lang/ should be downloaded to fc-lang directory
use FileHandle;
sub parse_fc_lang_dir($);
sub parse_orth_file($;$);
sub parse_sfd_file($);
sub inc_coverage($$);
sub print_coverage();
# map (language code => ( 'name' => name, 'chars' => list of glyphs, 'coverage' => ( sfd_file => coverage ) )
%langs = ();
sub parse_fc_lang_dir($) {
my ($fc_lang_dir) = @_;
opendir(DIR, $fc_lang_dir) || die "Unable to open $fc_lang_dir : $!\n";
my @orth_files = map { "$fc_lang_dir/$_" } grep { /\.orth$/ } readdir(DIR);
closedir(DIR);
foreach $orth_file (@orth_files) {
parse_orth_file($orth_file);
}
}
# missing or UTF-8 lang names
%lang_names = (
'gn' => 'Guarani',
'ja' => 'Japanese',
'nb' => 'Norwegian Bokmal',
'no' => 'Norwegian (Bokmal)',
'se' => 'North Sami',
'sma' => 'South Sami',
'smj' => 'Lule Sami',
'smn' => 'Inari Sami',
'sms' => 'Skolt Sami',
'vo' => 'Volapuk',
'zh-tw' => 'Chinese (traditional)',
);
sub parse_orth_file($;$) {
my ($orth_file, $lang) = @_;
if (!defined $lang) {
($lang) = ($orth_file =~ m,/([^/]*)\.[^./]*$,);
$lang =~ tr/_/-/;
}
# XXX some names in orth files have different language codes
my $orth_lang = $lang;
$orth_lang = 'kw' if ($orth_lang eq 'ay');
$orth_lang = 'kw' if ($orth_lang eq 'fj');
$orth_lang = 'eth' if ($orth_lang eq 'gez');
$orth_lang = 'hi' if ($orth_lang eq 'pa');
$orth_lang = 'cu' if ($orth_lang eq 'sco');
$orth_lang = 'af' if ($orth_lang eq 'sm');
$orth_lang = 'smj' if ($orth_lang eq 'sms');
$orth_lang = 'ge' if ($orth_lang eq 'te');
if (exists($lang_names{$lang})) {
$langs{$lang}{'name'} = $lang_names{$lang};
}
my $f = new FileHandle($orth_file) || die "Unable to open $orth_file : $!\n";
while (<$f>) {
if (!exists($langs{$lang}{'name'})) {
if (/^#\s*(.*?)\s*\($lang\)/i) {
$langs{$lang}{'name'} = $1;
next;
}
if (/^#\s*(.*?)\s*\($orth_lang\)/i) {
$langs{$lang}{'name'} = $1;
next;
}
}
next if (/^\s*(#|$)/);
if (/^\s*include\s+(\S+)/) {
my $include = $1;
my $include_file;
($include_file = $orth_file) =~ s,/[^/]+$,/$include,;
if ($include_file eq $orth_file) {
print "$orth_file creates an include loop";
}
else {
parse_orth_file($include_file, $lang);
}
next;
}
my ($start) = ($_ =~ /^\s*(\S+)/);
if ($lang eq 'ibo') {
# XXX ibo.orth 1ee1 -> 1ee4 (https://bugs.freedesktop.org/show_bug.cgi?id=6237)
$start = '1ee4' if ($start eq '1ee1');
}
my $end = $start;
if ($start =~ /-/) {
($start, $end) = split(/-/, $start);
}
# XXX ab.orth 0re1 -> 04e1 (https://bugs.freedesktop.org/show_bug.cgi?id=6238)
$end = '04e1' if ($end eq '0re1');
$start = hex ($start);
$end = hex ($end);
for (my $dec_enc = $start; $dec_enc <= $end; $dec_enc++) {
$langs{$lang}{'chars'}{$dec_enc} = 1;
}
}
$f->close();
}
sub inc_coverage($$) {
my ($sfd_file, $dec_enc) = @_;
foreach $lang (keys %langs) {
if (exists $langs{$lang}{'chars'}{$dec_enc}) {
$langs{$lang}{'coverage'}{$sfd_file}++;
}
}
}
sub parse_sfd_file($) {
my ($sfd_file) = @_;
open (F, $sfd_file) || die "Unable to open $sfd_file : $!\n";
my $curchar = '';
my $curenc = '';
my $empty = 0;
while (<F>) {
if (/^StartChar:\s*(\S+)\s*$/) {
$curchar = $1;
$curenc = '';
$empty = 0;
} elsif (/^Colour:/) {
# XXX this is quick'n'dirty hack to detect non-empty glyphs
$empty = 1;
} elsif (/^Encoding:\s*\d+\s*(\d+)\s*\d+\s*$/) {
$curenc = $1;
} elsif ($curenc && !$empty && /^EndChar\s*/) {
inc_coverage ($sfd_file, $curenc);
}
}
close (F);
}
# TODO: formats would be better
sub print_coverage() {
print <<END;
This is the language coverage file for DejaVu fonts
(\$Id\$)
END
print " ";
foreach $sfd_file (@sfd_files) {
my $label = $sfd_files{$sfd_file};
printf "%-19s", $label;
}
print "\n";
foreach $lang (sort keys %langs) {
my $name = $langs{$lang}{'name'};
my $length = keys %{$langs{$lang}{'chars'}};
printf "%-6s %-40s", $lang, $name;
foreach $sfd_file (@sfd_files) {
my ($coverage) = $langs{$lang}{'coverage'}{$sfd_file};
$coverage = 0 if (!defined $coverage);
my ($percent) = ($length != 0) ? ($coverage/$length * 100) : 0;
if ($percent > 0) {
printf " %3d%%", $percent;
} else {
print " ";
}
printf " %-13s", "($coverage/$length)";
}
print "\n";
}
}
if (@ARGV < 3) {
print STDERR "usage: fc-lang_dir sfd_file1 label1 (sfd_file2 label2...)\n";
exit 1;
}
$fc_lang_dir = shift @ARGV;
@sfd_files = ();
%sfd_files = ();
while (@ARGV) {
$sfd_file = shift @ARGV;
$label = shift @ARGV;
push (@sfd_files, $sfd_file);
$sfd_files{$sfd_file} = $label;
}
parse_fc_lang_dir($fc_lang_dir);
foreach $sfd_file (@sfd_files) {
parse_sfd_file($sfd_file);
}
print_coverage();
1;
#!/usr/bin/perl -w
# $Id: problems.pl 2209 2008-04-11 14:34:16Z moyogo $
# possible problems finder
# (c)2004,2005 Stepan Roh (PUBLIC DOMAIN)
# usage: ./problems.pl [-l <0|1|2|3>] sfd_files+
# detected problems (higher levels contain lower levels):
# level 0:
# monospaced font (with Mono in name) without indication in Panose (and vice-versa)
# glyphs in monospaced face with different width
# not normalized file (looks for WinInfo, DisplaySize, HStem, VStem, Ref, KernsSLIF, different position than encoding,
# unordered glyphs or H or M flag)
# glyphs without width or with negative width
# duplicate glyphs
# combining marks with non-zero width in non-monospaced fonts
# missing point numbers in splines
# level 1 (default):
# colorized glyphs with content