Compare commits

..

No commits in common. "rawhide" and "f33" have entirely different histories.

19 changed files with 414 additions and 553 deletions

View file

@ -1 +0,0 @@
1

3
.gitignore vendored
View file

@ -22,6 +22,3 @@ fontforge_full-20100501.tar.bz2
/fontforge-20190317.tar.gz
/fontforge-20190413.tar.gz
/fontforge-20200314.tar.gz
/fontforge-20201107.tar.gz
/fontforge-20230101.tar.gz
/fontforge-20251009.tar.gz

View file

@ -1,181 +0,0 @@
From 472e238cafcff113c7be9815a13ff864540d5ef9 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Thu, 6 Jul 2023 19:15:53 -0400
Subject: [PATCH] Fix errors in French and Italian translations
With gettext-0.22, these mismatches trigger errors:
'msgstr' is not a valid C format string, unlike 'msgid'. Reason: In the
directive number 2, the argument size specifier is invalid.
---
po/fr.po | 36 ++++++++++++++++++------------------
po/it.po | 8 ++++----
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/po/fr.po b/po/fr.po
index 26e446b38..cb492d7a0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -291,7 +291,7 @@ msgstr "chaîne %1$.30s pour %2$.30s"
#. GT: $4 is the changed flag ('*' for the changed items)
#, c-format
msgid "%1$.80s at %2$d from %3$.90s%4$s"
-msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
+msgstr "%1$.80s à %2$d de %3$.90s%4$s"
#. GT: This is the title for a window showing a bitmap character
#. GT: It will look something like:
@@ -302,7 +302,7 @@ msgstr "%1$.80s à %2$d de %3$.90hs%4$s"
#. GT: $4 is the font name
#, c-format
msgid "%1$.80s at %2$d size %3$d from %4$.80s"
-msgstr "%1$.80s (%2$d) taille %3$d de %4$.80hs"
+msgstr "%1$.80s (%2$d) taille %3$d de %4$.80s"
#, c-format
msgid "%1$s from lookup subtable %2$.50s"
@@ -7433,7 +7433,7 @@ msgid ""
"Reverting the file will lose those changes.\n"
"Is that what you want?"
msgstr ""
-"La fonte %1$.40s dans le fichier %2$.40hs a été modifiée.\n"
+"La fonte %1$.40s dans le fichier %2$.40s a été modifiée.\n"
"Revenir vous fera perdre toutes les modifications.\n"
"Voulez vous vraiment revenir ?"
@@ -19925,7 +19925,7 @@ msgid ""
"The fonts %1$.30s and %2$.30s have a different number of glyphs or different "
"encodings"
msgstr ""
-"Les fontes %1$.30s et %2$.30hs n'ont pas le même nombre de glyphes ou des "
+"Les fontes %1$.30s et %2$.30s n'ont pas le même nombre de glyphes ou des "
"codages différents"
#, c-format
@@ -19933,7 +19933,7 @@ msgid ""
"The fonts %1$.30s and %2$.30s use different types of splines (one quadratic, "
"one cubic)"
msgstr ""
-"Les fontes %1$.30s et %2$.30hs utilisent des courbes de Bézier d'ordres "
+"Les fontes %1$.30s et %2$.30s utilisent des courbes de Bézier d'ordres "
"différents (quadratique et cubique)"
msgid "The generated font won't work with ATM"
@@ -19968,8 +19968,8 @@ msgid ""
"The glyph %1$.30s in font %2$.30s has a different hint mask on its contours "
"than in %3$.30s"
msgstr ""
-"Le glyphe %1$.30s dans la police %2$.30hs a un masque de hints différent que "
-"dans %3$.30hs"
+"Le glyphe %1$.30s dans la police %2$.30s a un masque de hints différent que "
+"dans %3$.30s"
#, c-format
msgid ""
@@ -19984,8 +19984,8 @@ msgid ""
"The glyph %1$.30s in font %2$.30s has a different number of references than "
"in %3$.30s"
msgstr ""
-"Le glyphe %1$.30s de la fonte %2$.30hs a un nombre de références différent "
-"dans %3$.30hs"
+"Le glyphe %1$.30s de la fonte %2$.30s a un nombre de références différent "
+"dans %3$.30s"
#, c-format
msgid ""
@@ -20457,7 +20457,7 @@ msgstr ""
#, c-format
msgid "The outlines of glyph %2$.30s were not found in the font %1$.60s"
msgstr ""
-"Le contours du glyphe %2$.30s n'ont pas été trouvés dans la police %1$.60hs"
+"Le contours du glyphe %2$.30s n'ont pas été trouvés dans la police %1$.60s"
msgid "The paths that make up this glyph intersect one another"
msgstr "Les chemins qui composent ce glyphe se coupent les uns les autres"
@@ -21042,7 +21042,7 @@ msgstr "Il y a déjà une sous-table avec ce nom, changez de nom SVP"
#, c-format
msgid "There is already an anchor point named %1$.40s in %2$.40s."
-msgstr "Il y a déjà une ancre appelée %1$.40s dans %2$.40hs."
+msgstr "Il y a déjà une ancre appelée %1$.40s dans %2$.40s."
msgid "There is another glyph in the font with this name"
msgstr "Il y a un autre glyphe dans la fonte avec ce nom"
@@ -21441,8 +21441,8 @@ msgid ""
"been able to find is %1$.20s-%2$.20s-%4$d.\n"
"Shall I use that or let you search?"
msgstr ""
-"Cette fonte est basée sur le jeu de caractères %1$.20s-%2$.20hs-%3$d, mais "
-"ce que j'ai trouvé de mieux c'est %1$.20hs-%2$.20hs-%4$d.\n"
+"Cette fonte est basée sur le jeu de caractères %1$.20s-%2$.20s-%3$d, mais "
+"ce que j'ai trouvé de mieux c'est %1$.20s-%2$.20s-%4$d.\n"
"Devrais-je utiliser cette valeur ou préférez vous chercher ?"
msgid ""
@@ -21770,7 +21770,7 @@ msgid ""
"with a 0 offset for this combination. Would you like to alter this kerning "
"class entry (or create a kerning pair for just these two glyphs)?"
msgstr ""
-"Cette paire de crénage (%.20s et %.20hs) est dans une classe de crénage\n"
+"Cette paire de crénage (%.20s et %.20s) est dans une classe de crénage\n"
"avec un déplacement de 0 pour cette combinaison. Voulez-vous modifier cette "
"partie\n"
"de la classe de crénage (ou créer une nouvelle paire rien que pour ces 2 "
@@ -24551,8 +24551,8 @@ msgid ""
"referred to.\n"
"It will not be copied."
msgstr ""
-"Vous essayer de coller une référence vers %1$s dans %2$hs.\n"
-"Mais %1$hs n'existe pas dans cette fonte, et FontForge ne trouve pas le "
+"Vous essayer de coller une référence vers %1$s dans %2$s.\n"
+"Mais %1$s n'existe pas dans cette fonte, et FontForge ne trouve pas le "
"glyphe auquel il se référait.\n"
"Le glyphe ne sera pas copié."
@@ -24562,8 +24562,8 @@ msgid ""
"But %1$s does not exist in this font.\n"
"Would you like to copy the original splines (or delete the reference)?"
msgstr ""
-"Vous essayer de coller une référence vers %1$s dans %2$hs.\n"
-"Mais %1$hs n'existe pas dans cette fonte.\n"
+"Vous essayer de coller une référence vers %1$s dans %2$s.\n"
+"Mais %1$s n'existe pas dans cette fonte.\n"
"Voulez vous copier le contour d'origine (ou supprimer la référence)?"
msgid ""
diff --git a/po/it.po b/po/it.po
index e13711485..d0c3ea987 100644
--- a/po/it.po
+++ b/po/it.po
@@ -2303,7 +2303,7 @@ msgid ""
"Reverting the file will lose those changes.\n"
"Is that what you want?"
msgstr ""
-"Il font %1$.40s nel file %2$.40hs è stato modificato.\n"
+"Il font %1$.40s nel file %2$.40s è stato modificato.\n"
"Ripristinando il file perderai tutte le modifiche.\n"
"È quello che vuoi fare?"
@@ -5835,7 +5835,7 @@ msgid ""
"The glyph %1$.30s has a different number of contours in font %2$.30s than in "
"%3$.30s"
msgstr ""
-"Il glifo %1$.30s ha un diverso numero di contorni nel font %2$.30hs rispetto "
+"Il glifo %1$.30s ha un diverso numero di contorni nel font %2$.30s rispetto "
"a %3$.30s"
#, c-format
@@ -6235,8 +6235,8 @@ msgid ""
"been able to find is %1$.20s-%2$.20s-%4$d.\n"
"Shall I use that or let you search?"
msgstr ""
-"Questo font è basato sulla codifica di caratteri %1$.20s-%2$.20hs-%3$d, ma "
-"il migliore che io abbia trovato è %1$.20hs-%2$.20hs-%4$d.\n"
+"Questo font è basato sulla codifica di caratteri %1$.20s-%2$.20s-%3$d, ma "
+"il migliore che io abbia trovato è %1$.20s-%2$.20s-%4$d.\n"
"Devo usare questo valore o preferisci cercare tu stesso?"
msgid ""
--
2.41.0

View file

@ -1,178 +0,0 @@
From a64099931ea004a08e074b08ad0984d92c25daa2 Mon Sep 17 00:00:00 2001
From: Peter Kydas <pk@canva.com>
Date: Tue, 6 Feb 2024 10:23:36 +1100
Subject: [PATCH] fix splinefont shell command injection
---
fontforge/splinefont.c | 125 +++++++++++++++++++++++++++++------------
1 file changed, 90 insertions(+), 35 deletions(-)
diff --git a/fontforge/splinefont.c b/fontforge/splinefont.c
index 239fdc035b..647daee109 100644
--- a/fontforge/splinefont.c
+++ b/fontforge/splinefont.c
@@ -788,11 +788,14 @@ return( name );
char *Unarchive(char *name, char **_archivedir) {
char *dir = getenv("TMPDIR");
- char *pt, *archivedir, *listfile, *listcommand, *unarchivecmd, *desiredfile;
+ char *pt, *archivedir, *listfile, *desiredfile;
char *finalfile;
int i;
int doall=false;
static int cnt=0;
+ gchar *command[5];
+ gchar *stdoutresponse = NULL;
+ gchar *stderrresponse = NULL;
*_archivedir = NULL;
@@ -827,18 +830,30 @@ return( NULL );
listfile = malloc(strlen(archivedir)+strlen("/" TOC_NAME)+1);
sprintf( listfile, "%s/" TOC_NAME, archivedir );
- listcommand = malloc( strlen(archivers[i].unarchive) + 1 +
- strlen( archivers[i].listargs) + 1 +
- strlen( name ) + 3 +
- strlen( listfile ) +4 );
- sprintf( listcommand, "%s %s %s > %s", archivers[i].unarchive,
- archivers[i].listargs, name, listfile );
- if ( system(listcommand)!=0 ) {
- free(listcommand); free(listfile);
- ArchiveCleanup(archivedir);
-return( NULL );
- }
- free(listcommand);
+ command[0] = archivers[i].unarchive;
+ command[1] = archivers[i].listargs;
+ command[2] = name;
+ command[3] = NULL; // command args need to be NULL-terminated
+
+ if ( g_spawn_sync(
+ NULL,
+ command,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL,
+ NULL,
+ &stdoutresponse,
+ &stderrresponse,
+ NULL,
+ NULL
+ ) == FALSE) { // did not successfully execute
+ ArchiveCleanup(archivedir);
+ return( NULL );
+ }
+ // Write out the listfile to be read in later
+ FILE *fp = fopen(listfile, "wb");
+ fwrite(stdoutresponse, strlen(stdoutresponse), 1, fp);
+ fclose(fp);
desiredfile = ArchiveParseTOC(listfile, archivers[i].ars, &doall);
free(listfile);
@@ -847,22 +862,28 @@ return( NULL );
return( NULL );
}
- /* I tried sending everything to stdout, but that doesn't work if the */
- /* output is a directory file (ufo, sfdir) */
- unarchivecmd = malloc( strlen(archivers[i].unarchive) + 1 +
- strlen( archivers[i].listargs) + 1 +
- strlen( name ) + 1 +
- strlen( desiredfile ) + 3 +
- strlen( archivedir ) + 30 );
- sprintf( unarchivecmd, "( cd %s ; %s %s %s %s ) > /dev/null", archivedir,
- archivers[i].unarchive,
- archivers[i].extractargs, name, doall ? "" : desiredfile );
- if ( system(unarchivecmd)!=0 ) {
- free(unarchivecmd); free(desiredfile);
- ArchiveCleanup(archivedir);
-return( NULL );
+ command[0] = archivers[i].unarchive;
+ command[1] = archivers[i].extractargs;
+ command[2] = name;
+ command[3] = doall ? "" : desiredfile;
+ command[4] = NULL;
+
+ if ( g_spawn_sync(
+ (gchar*)archivedir,
+ command,
+ NULL,
+ G_SPAWN_SEARCH_PATH,
+ NULL,
+ NULL,
+ &stdoutresponse,
+ &stderrresponse,
+ NULL,
+ NULL
+ ) == FALSE) { // did not successfully execute
+ free(desiredfile);
+ ArchiveCleanup(archivedir);
+ return( NULL );
}
- free(unarchivecmd);
finalfile = malloc( strlen(archivedir) + 1 + strlen(desiredfile) + 1);
sprintf( finalfile, "%s/%s", archivedir, desiredfile );
@@ -885,20 +906,54 @@ struct compressors compressors[] = {
char *Decompress(char *name, int compression) {
char *dir = getenv("TMPDIR");
- char buf[1500];
char *tmpfn;
-
+ gchar *command[4];
+ gint stdout_pipe;
+ gchar buffer[4096];
+ gssize bytes_read;
+ GByteArray *binary_data = g_byte_array_new();
+
if ( dir==NULL ) dir = P_tmpdir;
tmpfn = malloc(strlen(dir)+strlen(GFileNameTail(name))+2);
strcpy(tmpfn,dir);
strcat(tmpfn,"/");
strcat(tmpfn,GFileNameTail(name));
*strrchr(tmpfn,'.') = '\0';
- snprintf( buf, sizeof(buf), "%s < %s > %s", compressors[compression].decomp, name, tmpfn );
- if ( system(buf)==0 )
-return( tmpfn );
- free(tmpfn);
-return( NULL );
+
+ command[0] = compressors[compression].decomp;
+ command[1] = "-c";
+ command[2] = name;
+ command[3] = NULL;
+
+ // Have to use async because g_spawn_sync doesn't handle nul-bytes in the output (which happens with binary data)
+ if (g_spawn_async_with_pipes(
+ NULL,
+ command,
+ NULL,
+ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ &stdout_pipe,
+ NULL,
+ NULL) == FALSE) {
+ //command has failed
+ return( NULL );
+ }
+
+ // Read binary data from pipe and output to file
+ while ((bytes_read = read(stdout_pipe, buffer, sizeof(buffer))) > 0) {
+ g_byte_array_append(binary_data, (guint8 *)buffer, bytes_read);
+ }
+ close(stdout_pipe);
+
+ FILE *fp = fopen(tmpfn, "wb");
+ fwrite(binary_data->data, sizeof(gchar), binary_data->len, fp);
+ fclose(fp);
+ g_byte_array_free(binary_data, TRUE);
+
+ return(tmpfn);
}
static char *ForceFileToHaveName(FILE *file, char *exten) {

View file

@ -0,0 +1,27 @@
From ee14a6389d19e2f45219134058e07f10585fa6d3 Mon Sep 17 00:00:00 2001
From: Jeremy Tan <jtanx@outlook.com>
Date: Thu, 2 Apr 2020 18:03:47 +0800
Subject: [PATCH] Call gdk_set_allowed_backends before gdk_init
Fixes #4247
---
fontforgeexe/startui.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fontforgeexe/startui.c b/fontforgeexe/startui.c
index 06f5200a4..114bb7fb6 100644
--- a/fontforgeexe/startui.c
+++ b/fontforgeexe/startui.c
@@ -1182,8 +1182,8 @@ int fontforge_main( int argc, char **argv ) {
#endif
}
#ifdef FONTFORGE_CAN_USE_GDK
- gdk_init(&argc, &argv);
gdk_set_allowed_backends("win32,quartz,x11");
+ gdk_init(&argc, &argv);
#endif
ensureDotFontForgeIsSetup();
#if defined(__MINGW32__) && !defined(_NO_LIBCAIRO)
--
2.26.0

View file

@ -0,0 +1,284 @@
--- doc/sphinx/glossary.rst.old 2020-03-14 09:06:49.000000000 +0530
+++ doc/sphinx/glossary.rst 2020-08-05 12:06:45.574903248 +0530
@@ -23,13 +23,13 @@
Both Hebrew and Arabic have optional vowel marks and are called "impure"
abjads. Ancient Phoenician had nothing but consonants and is a "pure" abjad.
- See Also: :term:`alphabet`,
- :term:`abugida`, :term:`syllabary` and
+ See Also: :term:`Alphabet`,
+ :term:`Abugida`, :term:`Syllabary` and
the relevant `Wikipedia article <http://en.wikipedia.org/wiki/Abjad>`__.
Abugida
- An abugida is somewhere in between an :term:`alphabet` and
- a :term:`syllabary`. The Indic writing systems are
+ An abugida is somewhere in between an :term:`alphabet <Alphabet>` and
+ a :term:`syllabary <Syllabary>`. The Indic writing systems are
probably the best known abugidas.
In most abugidas there are independant glyphs for the consonants, and each
@@ -45,8 +45,8 @@
An abugida differs from an abjad in that vowels (other than the default) must
be marked in the abugida.
- See Also: :term:`alphabet`, :term:`abjad`,
- :term:`syllabary` and the relevant
+ See Also: :term:`Alphabet`, :term:`Abjad`,
+ :term:`Syllabary` and the relevant
`Wikipedia article <http://en.wikipedia.org/wiki/Abugida>`__.
Advance Width
@@ -62,8 +62,8 @@
vowels alike -- and (in theory anyway) all phonemes in a word will be marked
by an appropriate glyph.
- See Also: :term:`abjad`, :term:`abugida`,
- :term:`syllabary` and the relevant
+ See Also: :term:`Abjad`, :term:`Abugida`,
+ :term:`Syllabary` and the relevant
`Wikipedia article <http://en.wikipedia.org/wiki/Alphabet>`__.
Apple Advanced Typography
@@ -83,7 +83,7 @@
Ascent
In traditional typography the ascent of a font was the distance from the top
- of a block of type to the :term:`baseline`.
+ of a block of type to the :term:`baseline <Baseline>`.
Its precise meaning in modern typography seems to vary with different
definers.
@@ -127,7 +127,7 @@
Black letter
Any of various type families based on medieval handwriting.
- See also :term:`gothic`.
+ See also :term:`Gothic`.
BMP
Basic Multilingual Plane
@@ -142,13 +142,13 @@
(0xE0000-0xEFFFF)
Bold
- A common font :term:`style`. The stems of the glyphs are
+ A common font :term:`style <Style>`. The stems of the glyphs are
wider than in the normal font, giving the letters a darker impression. Bold
is one of the few :term:`LGC` styles that translate readily to
other scripts.
Bopomofo
- A (modern~1911) Chinese (Mandarin) :term:`alphabet` used
+ A (modern~1911) Chinese (Mandarin) :term:`alphabet <Alphabet>` used
to provide phonetic transliteration of Han ideographs in dictionaries.
Boustrophedon
@@ -158,7 +158,7 @@
Writing "as the ox plows", that is alternating between left to right and
right to left writing directions. Early alphabets (Old Canaanite, and the
very early greek writings (and, surprisingly,
- :term:`fuþark`)) used this. Often the right to left glyphs
+ :term:`Fuþark`)) used this. Often the right to left glyphs
would be mirrors of the left to right ones. As far as I know, no modern
writing system uses this method (nor does OpenType have any support for it).
See Also :term:`Bidi`.
@@ -181,7 +181,7 @@
Character
A character is a Platonic ideal reified into at least one
- :term:`glyph`. For example the letter "s" is a character
+ :term:`glyph <Glyph>`. For example the letter "s" is a character
which is reified into several different glyphs: "S", "s", "*s*", long-s, etc.
Note that these glyphs can look fairly different from each other, however
although the glyph for an integral sign might be the same as the long-s
@@ -232,7 +232,7 @@
Descent
In traditional typography the descent of a font was the distance from the
- bottom of a block of type to the :term:`baseline`.
+ bottom of a block of type to the :term:`baseline <Baseline>`.
Its precise meaning in modern typography seems to vary with different
definers.
@@ -248,7 +248,7 @@
:ref:`anchored marks <anchorcontrol.DeviceTable>`.
Didot point
- The European :term:`point`. 62 :sup:`2`/:small:`3` points per
+ The European :term:`point <Point>`. 62 :sup:`2`/:small:`3` points per
23.566mm ( 2.66pt/mm or 67.55pt/inch ). There is also a "metric" didiot
point: .4mm.
@@ -275,7 +275,7 @@
Encoding
An encoding is a mapping from a set of bytes onto a
- :term:`character set`. It is what determines which
+ :term:`character set <Character set>`. It is what determines which
byte sequence represents which character. The words "encoding" and "character
set" are often used synonymously. The specification for ASCII specifies both
a character set and an encoding. But CJK character sets often have multiple
@@ -293,7 +293,7 @@
two sounds associated with it, but it does, see also
:term:`Thorn`)
- Even-Odd Fill rule
+ Even-Odd Fill Rule
To determine if a pixel should be
:ref:`filled using this rule <editexample2.even-odd-non-zero>`, draw a line from the
pixel to infinity (in any direction) then count the number of times contours
@@ -332,7 +332,7 @@
Font
A collection of :term:`glyphs <Glyph>`, generally with at least one
glyph associated with each character in the font's
- :term:`character set`, often with an encoding.
+ :term:`character set <Character set>`, often with an encoding.
A font contains much of the information needed to turn a sequence of bytes
into a set of pictures representing the characters specified by those bytes.
@@ -342,8 +342,8 @@
different font for each point-size.
Font Family, or just Family
- A collection of related :term:`font`\ s. Often including plain,
- italic and bold :term:`style`\ s.
+ A collection of related :term:`font <Font>`\ s. Often including plain,
+ italic and bold :term:`style <Style>`\ s.
FontForge
This.
@@ -356,7 +356,7 @@
Fractur
The old black letter writing style used in Germany up until world war II.
- See also :term:`gothic`.
+ See also :term:`Gothic`.
Fuþark
Futhark
@@ -430,7 +430,7 @@
China.
Hangul
- The Korean :term:`syllabary`. The only syllabary (that
+ The Korean :term:`Syllabary`. The only syllabary (that
I'm aware of anway) based on an alphabet -- the letters of the alphabet never
appear alone, but only as groups of two or three making up a syllable.
@@ -439,11 +439,11 @@
Hints
These are described in detail in :ref:`the main manual <overview.Hints>`.
- They help the rasterizer to draw a :term:`glyph` well at
+ They help the rasterizer to draw a :term:`glyph <Glyph>` well at
small pointsizes.
Hint Masks
- At any given point on a contour :term:`hints` may not
+ At any given point on a contour :term:`hints <Hints>` may not
:term:`conflict <Conflicting hints>`. However different points in a
glyph may need conflicting hints. So every now and then a contour will change
which hints are active. Each list of active hints is called a hint mask.
@@ -457,7 +457,7 @@
Generally used to mean Han (Chinese) characters.
Italic
- A slanted :term:`style` of a font, generally used for
+ A slanted :term:`style <Style>` of a font, generally used for
emphasis.
Italic differs from :term:`Oblique` in that the
@@ -498,7 +498,7 @@
to it.
Kern pair
- A pair of glyphs for which :term:`kerning` information has
+ A pair of glyphs for which :term:`kerning <Kerning>` information has
been specified.
Kerning by classes
@@ -541,9 +541,9 @@
Manyogana
An early Japanese script, ancestral to both
- :term:`hiragana` and :term:`katakana`.
+ :term:`Hiragana` and :term:`Katakana`.
`Manyogana <http://en.wikipedia.org/wiki/Manyogana>`__ used
- :term:`kanji` for their phontic sounds, and over the years
+ :term:`Kanji` for their phontic sounds, and over the years
these kanji were simplified into hiragana and katahana.
Metal Type
@@ -622,7 +622,7 @@
:doc:`here for the tables used by FontForge </techref/TrueOpenTables>`.
Oblique
- A slanted :term:`style` of a font, generally used for
+ A slanted :term:`style <Style>` of a font, generally used for
emphasis.
Oblique differs from :term:`Italic` in that the
@@ -695,7 +695,7 @@
`See Caslon's type specimen sheet on Wikipedia. <http://en.wikipedia.org/wiki/Alphabet>`__
Pica point
- The Anglo-American :term:`point`. With 72.27 points per inch
+ The Anglo-American :term:`point <Point>`. With 72.27 points per inch
( 2.85pt /mm ).
Point
@@ -708,7 +708,7 @@
points per inch, 2.86pt/mm).
The didiot and pica points were so arranged that text at a given point-size
- would have approximately the same :term:`cap-height` in
+ would have approximately the same :term:`cap-height <Cap-height>` in
both systems, the didot point would have extra white-space above the capitals
to contain the accents present in most non-English Latin based scripts.
@@ -757,7 +757,7 @@
again only allows a 1 byte encoding, but the OpenType wrapper extends this to
provide more complex encoding types.
* Type 3 -- This format allows full postscript within the font, but it means
- that no :term:`hints` are allowed, so these fonts will not
+ that no :term:`hints <Hints>` are allowed, so these fonts will not
look as nice at small point-sizes. Also most (screen) rasterizers are
incapable of dealing with them. A type 3 font is limited to a one byte
encoding (ie. only 256 glyphs may be encoded).
@@ -922,13 +922,13 @@
Style
There are various conventional variants of a font. In probably any writing
system the thickness of the stems of the glyphs may be varied, this is called
- the :term:`weight` of a font. Common weights are normal and
+ the :term:`weight <Weight>` of a font. Common weights are normal and
bold.
- In :term:`LGC` alphabets an :term:`italic` (or
- :term:`oblique`) style has arisen and is used for emphasis.
+ In :term:`LGC` alphabets an :term:`italic <Italic>` (or
+ :term:`oblique <Oblique>`) style has arisen and is used for emphasis.
- Fonts are often compressed into a :term:`condensed`
+ Fonts are often compressed into a :term:`condensed <Condensed>`
style, or expanded out into an :term:`extended style <Extended>`.
Various other styles are in occasional use: underline, overstrike, outline,
@@ -945,7 +945,7 @@
tend to be bigger than alphabets (Japanese KataKana requires about 60
different characters, while the Korean Hangul requires tens of thousands).
- See Also: :term:`abjad`, :term:`abugida`, :term:`alphabet` and the relevant
+ See Also: :term:`Abjad`, :term:`Abugida`, :term:`Alphabet` and the relevant
`Wikipedia article <http://en.wikipedia.org/wiki/S%20yllabary>`__.
TeX
@@ -1061,7 +1061,7 @@
Width
This is a slightly ambiguous term and is sometimes used to mean the
- :term:`advance width` (the distance from the start of
+ :term:`advance width <Advance Width>` (the distance from the start of
this glyph to the start of the next glyph), and sometimes used to mean the
distance from the left side bearing to the right side bearing.

View file

@ -0,0 +1,62 @@
From 36b52b9902a9e3858ef34ec006b6ad5da6374de1 Mon Sep 17 00:00:00 2001
From: Jeremy Tan <jtanx@outlook.com>
Date: Mon, 6 Apr 2020 20:57:14 +1000
Subject: [PATCH] sphinx: make changes to support Sphinx 3
---
doc/sphinx/scripting/python/fontforge.rst | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/doc/sphinx/scripting/python/fontforge.rst b/doc/sphinx/scripting/python/fontforge.rst
index b97332229..f726b1ed4 100644
--- a/doc/sphinx/scripting/python/fontforge.rst
+++ b/doc/sphinx/scripting/python/fontforge.rst
@@ -1365,6 +1365,7 @@ Layers may be compared to see if their contours are similar.
layer.stroke("calligraphic", width, height, angle[, FLAGS])
layer.stroke("polygon", contour[, FLAGS])
(Legacy interface)
+ :noindex:
.. method:: layer.stroke("circular", width [, CAP, JOIN, ANGLE, KEYWORD])
layer.stroke("elliptical", width, minor_width [, ANGLE, CAP, JOIN, KEYWORD])
@@ -2458,6 +2459,7 @@ must be created through the font.
glyph.stroke("calligraphic", width, height, angle[, FLAGS])
glyph.stroke("polygon", contour[, FLAGS])
(Legacy interface)
+ :noindex:
.. method:: glyph.stroke("circular", width[, CAP, JOIN, ANGLE, KEYWORD])
glyph.stroke("elliptical", width, minor_width[, ANGLE, CAP, JOIN, KEYWORD])
@@ -4786,21 +4788,6 @@ See the :class:`selection` type for how to alter the selection.
Extrema should be marked by on-curve points. If a curve in any selected
glyph lacks a point at a significant extremum this command will add one.
-.. method:: font.addSmallCaps()
-
- For all selected upper or lower case letters in the latin, greek and
- cyrillic scripts this will try to create a small caps version of that glyph
- in a new glyph slot.
-
- So if you select "A" (or "a") then a glyph "a.sc" will be created (if "a.sc"
- already exists, it will be reused, and its current contents cleared).
-
- The contents of "a.sc" will be based on the upper case variant of this glyph
- (and that variant must be present for the command to work). FontForge will
- also create two lookups (unless appropriate ones already exist) one, bound
- to the feature 'c2sc' will map upper case letters to small caps, the other,
- bound to feature 'smcp' will map lower case letters to small caps.
-
.. method:: font.autoHint()
Generates PostScript hints for all selected glyphs.
@@ -4993,6 +4980,7 @@ See the :class:`selection` type for how to alter the selection.
font.stroke("calligraphic", width, height, angle[, FLAGS])
font.stroke("polygon", contour[, FLAGS])
(Legacy interface)
+ :noindex:
.. method:: font.stroke("circular", width[, CAP, JOIN, ANGLE, KEYWORD])
font.stroke("elliptical", width, minor_width[, ANGLE, CAP, JOIN, KEYWORD])
--
2.26.0

View file

@ -1,16 +1,23 @@
%global gettext_package FontForge
%global gittag0 20200314
Name: fontforge
Version: 20251009
Release: 1%{?dist}
Version: 20200314
Release: 9%{?dist}
Summary: Outline and bitmap font editor
License: GPL-3.0-or-later
License: GPLv3+
URL: http://fontforge.github.io/
Source0: https://github.com/fontforge/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz
# https://github.com/fontforge/fontforge/pull/4253
Patch0: fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch
# https://github.com/fontforge/fontforge/pull/4269
Patch1: fontforge-20200314-sphinx-make-changes-to-support-Sphinx-3.patch
Patch2: fontforge-20200314-fix-glossary.rst-file.patch
Requires: xdg-utils
Requires: (autotrace or potrace)
Requires: autotrace
Requires: hicolor-icon-theme
BuildRequires: gcc-c++
@ -22,6 +29,7 @@ BuildRequires: giflib-devel
BuildRequires: libxml2-devel
BuildRequires: freetype-devel
BuildRequires: desktop-file-utils
BuildRequires: libuninameslist-devel
BuildRequires: libXt-devel
BuildRequires: xorg-x11-proto-devel
BuildRequires: gettext
@ -37,12 +45,6 @@ BuildRequires: shared-mime-info
# F33 onward need now
BuildRequires: gtk3-devel
BuildRequires: python3-sphinx
BuildRequires: make
# 20151009 version requires below
BuildRequires: gtkmm3.0-devel
%py_provides python3-fontforge
%py_provides python3-psMat
%description
FontForge (former PfaEdit) is a font editor for outline and bitmap
@ -68,13 +70,22 @@ This package contains documentation files for %{name}.
%prep
%autosetup
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p0
# Remove tests that requires Internet access
sed -i '45d;83d;101d;102d;114d;115d;125d' tests/CMakeLists.txt
rm tests/test003.pe tests/test130.pe tests/test0101.py tests/test929.py
# Remove tests for s390x
rm tests/test0004.py tests/test1009.py tests/test1010.py
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
%cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_WOFF2=ON \
-DPYHOOK_INSTALL_DIR=%{python3_sitearch}
-DENABLE_WOFF2=ON
%cmake_build
%install
@ -92,12 +103,14 @@ find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
rm -f %{buildroot}%{_datadir}/doc/fontforge/{.buildinfo,.nojekyll}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%check
pushd %{__cmake_builddir}
make check
popd
# Find translations
%find_lang %{gettext_package}
%check
%ctest
%files -f %{gettext_package}.lang
%doc AUTHORS
%license LICENSE COPYING.gplv3
@ -107,6 +120,7 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%{_datadir}/fontforge
%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge*
%{_mandir}/man1/*.1*
%{_datadir}/pixmaps/org.fontforge.FontForge*
%{_datadir}/mime/packages/fontforge.xml
%{_metainfodir}/org.fontforge.FontForge.appdata.xml
%{python3_sitearch}/fontforge.so
@ -119,97 +133,6 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
%doc %{_pkgdocdir}
%changelog
* Fri Oct 10 2025 Parag Nemade <pnemade AT redhat DOT com> - 20251009-1
- Update to 20251009 version (#2402960)
- Remove upstream released patches
- Add new BR: gtkmm3.0-devel
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jul 17 2025 Parag Nemade <pnemade AT redhat DOT com> - 20230101-17
- Update for https://fedoraproject.org/wiki/Changes/CMake_ninja_default (rh#2381004)
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 20230101-16
- Rebuilt for Python 3.14
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 14 2024 Gwyn Ciesla <gwync@protonmail.com> - 20230101-13
- Patch for Python 3.13
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 20230101-12
- Rebuilt for Python 3.13
* Wed Feb 28 2024 Parag Nemade <pnemade AT redhat DOT com> - 20230101-11
- Resolves: CVE-2024-25081 and CVE-2024-25082
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Aug 10 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 20230101-8
- Drop unused libuninameslist dependency
* Tue Aug 08 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 20230101-7
- Allow potrace as an alternative to autotrace
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 07 2023 Parag Nemade <pnemade AT redhat DOT com> - 20230101-5
- Fix fr.po and it.po translations issue
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 20230101-4
- Rebuilt for Python 3.12
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 20230101-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 02 2023 Parag Nemade <pnemade AT redhat DOT com> - 20230101-2
- Update license tag to SPDX format
- Fix test failure
* Mon Jan 02 2023 Parag Nemade <pnemade AT redhat DOT com> - 20230101-1
- Update to 20230101 version (#2157290)
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20220308-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 20220308-2
- Rebuilt for Python 3.11
* Thu Mar 10 2022 Parag Nemade <pnemade AT redhat DOT com> - 20220308-1
- Update to 20220308 version (#2062047)
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 20201107-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20201107-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 20201107-4
- Rebuilt for Python 3.10
* Mon Feb 01 2021 Parag Nemade <pnemade AT redhat DOT com> - 20201107-3
- The %%find_lang should run as part of %%install only
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 20201107-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Nov 25 2020 Parag Nemade <pnemade AT redhat DOT com> - 20201107-1
- Update to 20201107 version (#1895648)
- removed %%gittag0 macro, as it cause problem to automated package update script
* Sun Nov 22 2020 Benjamin A. Beasley <code@musicinmybrain.net> - 20200314-10
- Add py_provides macros to provide python3-fontforge, python3-psMat, etc.
* Wed Aug 05 2020 Parag Nemade <pnemade AT redhat DOT com> - 20200314-9
- Fix FTBFS bug by fixing glossary.rst and using new CMake macros

View file

@ -1,5 +0,0 @@
summary: Basic smoke test
discover:
how: fmf
execute:
how: tmt

View file

@ -1,24 +0,0 @@
--- pycontrib/FontCompare/setup.py~ 2022-12-31 23:25:21.000000000 -0600
+++ pycontrib/FontCompare/setup.py 2024-06-14 15:14:14.119920623 -0500
@@ -15,7 +15,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
#!/usr/bin/env python
-from distutils.core import setup
from setuptools import setup
setup(name='Font Compare',
version='1.0',
--- fontforge/python.c~ 2022-12-31 23:25:21.000000000 -0600
+++ fontforge/python.c 2024-06-14 15:38:41.397897757 -0500
@@ -19633,7 +19633,10 @@
if ( saved_progname )
free(saved_progname);
saved_progname = copy_to_wide_string(progname);
- Py_SetProgramName(saved_progname);
+ PyStatus status;
+ PyConfig config;
+ PyConfig_InitPythonConfig(&config);
+ status = PyConfig_SetString(&config, &config.program_name, saved_progname);
}
static wchar_t ** copy_argv(char *arg0, int argc ,char **argv) {

View file

@ -1 +1 @@
SHA512 (fontforge-20251009.tar.gz) = 2923c54e10585551c93102d8b7a389c9de3c629c1676fc8c576c9b9c3f1f6fe28f7a1e39fd5a57ab7eeadf0b17d722bf439ca94f0a788ceab6993e1a93ea7d5f
SHA512 (fontforge-20200314.tar.gz) = 9eecee6162d5d160c9fe5d3e229763edb0b52f53529659f0fa8b41cf3edf0685509f51d3993da0e6e2c36fecde867af60062e131e10d7fdfbaac16323855818f

View file

@ -1,5 +0,0 @@
require:
- fontforge
test: bash ./run_tests.sh
framework: shell

View file

@ -1,47 +0,0 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
NAME=fontforge
rlJournalStart
rlPhaseStartSetup
rlAssertRpm ${NAME}
rlAssertRpm ${NAME}-devel
rlShowPackageVersion ${NAME}
rlRun -t -l "VERSION=$(rpm -q ${NAME} --queryformat='%{version}')" 0 "Get VERSION"
FEDORA_VERSION=$(rlGetDistroRelease)
rlLog "FEDORA_VERSION=${DISTRO_RELEASE}"
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "pushd $tmp"
rlFetchSrcForInstalled "${NAME}"
rlRun "rpm --define '_topdir $tmp' -i *src.rpm"
rlRun -t -l "mkdir BUILD" 0 "Creating BUILD directory"
rlRun -t -l "rpmbuild --noclean --nodeps --define '_topdir $tmp' -bp $tmp/SPECS/*spec"
if [ -d BUILD/${NAME}-${VERSION}-build ]; then
rlRun -t -l "pushd BUILD/${NAME}-${VERSION}-build/${NAME}-${VERSION}"
else
rlRun -t -l "pushd BUILD/${NAME}-${VERSION}"
fi
rlRun "set -o pipefail"
rlRun "NOCONFIGURE=1 ./autogen.sh"
rlRun "./configure --disable-static --with-graphite2 --with-gobject --enable-introspection"
rlRun "make check"
rlRun "retval=$?"
rlRun "echo $retval"
rlPhaseEnd
rlPhaseStartTest
rlRun -t -l "INSTALLED_VERSION=$(hb-info --version|awk 'NR==1 {print $3}')" \
0 "Get installed version"
rlAssertEquals "versions should be equal" "${VERSION}" "${INSTALLED_VERSION}"
rlGetTestState
rlLog "Number of failed asserts so far: ${ECODE}"
rlRun "popd" 0
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd
rlJournalEnd

0
tests/run_tests.sh → tests/scripts/run_tests.sh Executable file → Normal file
View file

9
tests/tests.yml Normal file
View file

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: scripts/
run: ./run_tests.sh