- add use-sysconfig-not-distutils.patch: fix build with python 3.13

* Merge/Simplify improvements
- drop fix-return-statement.patch. obsolete
- updated to 20161005 [bsc#1014793]:
  * This release introduces a new icon set, new functionality for
    custom icon selection graphics, support for GlyphOrderAndAliasDB
    typefaces, stroke expansion, handling of CID ranges, and the
- updated to 20150824: This fixes a few bugs, including some in
  U. F. O. kerning classes and FreeType rasterization, and adds
- updated to 20150430: this release includes a few bug fixes,
- also repackage the broken gnulib links to fix build with
  * fixes a few crashes, enhances round-tripping of information in
- remove %requires_ge libpng16-16 as it seems fontforge is not so
- %requires_ge libpng16-16 to avoid
  * removed obsolete fontforge-missing-closedir.diff
  * removed obsolete libpng14.diff
  * Fix various error messages.
  * Remove some obsolete documentation.
  * Technical fixes to stroking code.
  * FontForge was using the wrong MIME type for svg files.
    W3C has changed it and it's now "image/svg+xml" not
  * etc. on
- fix -devel package dependencies
- remove BuildPreRequires
- fix gcc warning for strncat
- install icon

OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=94
This commit is contained in:
Takashi Iwai 2024-11-24 09:08:01 +00:00 committed by Git OBS Bridge
commit 673c75694f
10 changed files with 10022 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

BIN
20230101.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,71 @@
From: Antonio Larrosa <alarrosa@suse.com>
Subject: Add support to use bitmap font transformations from python
This is needed by ttf-converter/xorg-x11-fonts in order to generate
an Italic version of MUTT-ClearlyU-Wide at package build time.
Index: fontforge-20200314/fontforge/python.c
===================================================================
--- fontforge-20200314.orig/fontforge/python.c
+++ fontforge-20200314/fontforge/python.c
@@ -35,6 +35,7 @@
#include "autotrace.h"
#include "autowidth2.h"
#include "bitmapcontrol.h"
+#include "bvedit.h"
#include "cvexport.h"
#include "cvimages.h"
#include "cvundoes.h"
@@ -11933,6 +11934,44 @@ return( -1 );
return( 0 );
}
+static PyObject *PyFFFont_bitmapTransform(PyFF_Font *self, PyObject *args) {
+ SplineFont *sf = self->fv->sf;
+ BDFFont *bdf;
+ char *funcname;
+ int xoff, yoff, i;
+ enum bvtools type;
+
+ if ( CheckIfFontClosed(self) )
+ return( NULL );
+
+ if ( !PyArg_ParseTuple(args,"sii", &funcname, &xoff, &yoff))
+ return( NULL );
+
+ if (strcmp(funcname, "fliph") == 0)
+ type = bvt_fliph;
+ else if (strcmp(funcname, "flipv") == 0)
+ type = bvt_flipv;
+ else if (strcmp(funcname, "rotate90cw") == 0)
+ type = bvt_rotate90cw;
+ else if (strcmp(funcname, "rotate90ccw") == 0)
+ type = bvt_rotate90ccw;
+ else if (strcmp(funcname, "rotate180") == 0)
+ type = bvt_rotate180;
+ else if (strcmp(funcname, "skew") == 0)
+ type = bvt_skew;
+ else if (strcmp(funcname, "transmove") == 0)
+ type = bvt_transmove;
+ else Py_RETURN( self );
+
+ for ( bdf=sf->bitmaps; bdf!=NULL; bdf=bdf->next )
+ for ( i=0; i<bdf->glyphcnt; ++i )
+ if ( bdf->glyphs[i]!=NULL )
+ BCTransFunc(bdf->glyphs[i], type, xoff, yoff);
+
+Py_RETURN( self );
+}
+
+
static PyObject *PyFF_Font_get_bitmapSizes(PyFF_Font *self, void *UNUSED(closure)) {
PyObject *tuple;
int cnt;
@@ -18179,6 +18218,7 @@ Py_RETURN( self );
PyMethodDef PyFF_Font_methods[] = {
{ "appendSFNTName", (PyCFunction) PyFFFont_appendSFNTName, METH_VARARGS, "Adds or replaces a name in the sfnt 'name' table. Takes three arguments, a language, a string id, and the string value" },
+ { "bitmapTransform", (PyCFunction) PyFFFont_bitmapTransform, METH_VARARGS, "Transforms all bitmap glyphs."},
{ "close", (PyCFunction) PyFFFont_close, METH_NOARGS, "Frees up memory for the current font. Any python pointers to it will become invalid." },
{ "compareFonts", (PyCFunction) PyFFFont_compareFonts, METH_VARARGS, "Compares two fonts and stores the result into a file"},
{ "save", (PyCFunction) PyFFFont_Save, METH_VARARGS, "Save the current font to a sfd file" },

View File

@ -0,0 +1,172 @@
commit 216eb14b558df344b206bf82e2bdaf03a1f2f429 (HEAD -> 216eb14b558df344b206bf82e2bdaf03a1f2f429_CVE-2024-25081_CVE-2024-25082)
Author: Peter Kydas <pk@canva.com>
Date: Tue Feb 6 20:03:04 2024 +1100
fix splinefont shell command injection (#5367)
diff -Nura fontforge-20230101/fontforge/splinefont.c fontforge-20230101_new/fontforge/splinefont.c
--- fontforge-20230101/fontforge/splinefont.c 2023-01-01 13:25:21.000000000 +0800
+++ fontforge-20230101_new/fontforge/splinefont.c 2024-03-04 21:23:26.813893591 +0800
@@ -788,11 +788,14 @@
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 @@
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 );
+ 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 );
}
- free(listcommand);
+ // 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 );
}
- /* 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,8 +906,12 @@
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);
@@ -894,11 +919,41 @@
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) {

27
fontforge-version.patch Normal file
View File

@ -0,0 +1,27 @@
Index: fontforge-20190801/fontforge/start.c
===================================================================
--- fontforge-20190801.orig/fontforge/start.c 2019-08-21 13:44:15.537289287 +0200
+++ fontforge-20190801/fontforge/start.c 2019-08-21 13:44:39.253433054 +0200
@@ -108,8 +108,6 @@ return;
void doversion(const char *source_version_str) {
if ( source_version_str!=NULL )
- printf( "fontforge %s\n", source_version_str );
- printf( "build date: %s\n",
- FONTFORGE_MODTIME_STR );
+ printf( "libfontforge %s\n", source_version_str );
exit(0);
}
Index: fontforge-20190801/fontforgeexe/startnoui.c
===================================================================
--- fontforge-20190801.orig/fontforgeexe/startnoui.c 2019-08-21 13:44:15.541289311 +0200
+++ fontforge-20190801/fontforgeexe/startnoui.c 2019-08-21 13:45:22.769696849 +0200
@@ -128,7 +128,7 @@ int fontforge_main( int argc, char **arg
else if ( strcmp(pt,"-help")==0 )
doscripthelp();
else if ( strcmp(pt,"-version")==0 || strcmp(pt,"-v")==0 || strcmp(pt,"-V")==0 )
- doversion(FONTFORGE_VERSION);
+ doversion(source_version_str);
}
# if defined(_NO_PYTHON)
ProcessNativeScript(argc, argv,stdin);

727
fontforge.changes Normal file
View File

@ -0,0 +1,727 @@
-------------------------------------------------------------------
Thu Nov 21 20:31:36 UTC 2024 - Dirk Müller <dmueller@suse.com>
- add use-sysconfig-not-distutils.patch: fix build with python 3.13
-------------------------------------------------------------------
Tue Mar 5 12:17:37 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Add 642d8a3db6d4bc0e70b429622fdf01ecb09c4c10.patch: Fix build
with gettext 0.22.
-------------------------------------------------------------------
Sat Mar 2 03:24:22 UTC 2024 - Cliff Zhao <qzhao@suse.com>
- Add fontforge-CVE-2024-25081-CVE-2024-25082.patch
Backporting 216eb14b from upstream, Fix splinefont shell command
injection.
(CVE-2024-25081 CVE-2024-25082 bsc#1220404 bsc#1220405)
-------------------------------------------------------------------
Mon Feb 26 08:38:40 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %autosetup macro. Allows to eliminate the usage of deprecated
PatchN.
-------------------------------------------------------------------
Sun Dec 24 14:14:37 UTC 2023 - Marguerite Su <i@marguerite.su>
- drop fix-sphinx-doc.patch, upstream fixed
-------------------------------------------------------------------
Thu Mar 2 12:20:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 20230101:
* Display the block name for reserved code points
* Don't respond to wheel scrolls for buttons/tabsets
* gfilechooser.c: fix behaviour when changing file type
* Better control-drag handling for line-adjacent points
* Fix resolution of program root
* Fix missed nonextcp edit
* Support ToUnicode extraction from PDFs for Type3 fonts
* Add resource file and Windows application manifest
* Fix name extraction for Type3 fonts from pdfs
* cmake: Install fonttools and pycontrib
* Fix InfoPlist.strings file name.
* Fix normalisation of absolute paths
* Handle non-array cm transforms while reading graphics stream
from PDFs
* Fix rect extraction from graphics stream for type3 fonts
* Change which lookup types are suggested for jamo features
* Better line handling in simplify
* Use 'cmap' for Adobe-Identity-0 CID fonts
* Fix ChangeGlyph calcluations relative to new nonext/prevcp
conventions
* Docs composite glyph
* FVSplineFontPieceMeal: Check that the clut is present before
applying conversion
* Expand the lists of languages and scripts
* Add flags to Python font.transform()
* Support setting SplineChar width from importOutlines.
* Undefine "extended" macro temporarily on GNU Hurd
* Define PATH_MAX and MAXPATHLEN for GNU/Hurd compatibility
* Fix Ascent & Descent Importing from SVG Font
* Prevent floating point shenanigans in loop termination (fixes
#5012)
* GroupFindLPos() in fontforgeexe/groupsdlg.c null pointer fix
* Fix drawing outside of expose calls
* Fixed one more typo
* Upgrade GitHub Actions
* Prevents memory underflow in GFileMimeType() in gutils/fsys.c
* Add a preference for saving editor state
* splineutil.c: prevent hang on nan input
* Shell-quote command sent to compressor in BDF
* Fix pfadecrypt bugs
* Include `SFDUTF7` functions in `libfontforge.so`
* splinefit.c: Improvements to merge/simplify
* RFE: [FEAT] When reference to non-existent glyphs are present
in an OpenTy…
* docs: Python scripting - update font.mergeFeature with
details of boo…
* Fix logic for CharString double-movetos after PR 4685
* Upgrade to Unicode 15.0.0 and fix and expand the script lists
* Fix broken link on scripting page
* Fix typo in man page
* Fix painting behaviour of the ruler linger window and layer
change dialog
* fontinfo.c: fix crash from uninitialised other_pos
* tottfgpos: Fix needless warning about 16-bit field
* ufo.c: emit guidelines key
* fvmetrics.c: partial revert of 1033bc6
* Update tranlsations from Crowdin
* Fix woff2 decoding
* Record unicode cmap encodings when one glyph is in multiple
slots
-------------------------------------------------------------------
Sun Mar 20 21:20:14 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 20220308:
* Overhauled resource/appearance management
* Merge/Simplify improvements
* Updated Unicode support to Unicode 14.0.0
* Add Points Of Inflection / Balance / Harmonize
* Language system tag list/script range/feature list updates
* You can now substitute glyph(s) by NULL
* Reserved Font Names no longer written by default when adding SIL OFL to a font
* UFO include path is altered, please update your fonts if needed
* FontForge is now compiled with -Wall by default
* Cidmaps are now bundled
- drop fix-return-statement.patch. obsolete
-------------------------------------------------------------------
Sat Feb 20 10:46:42 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 20201107:
* This release falls on the 20th anniversary of the first release of
FontForge back in 2000. It brings a wide range of minor tweaks and bug
fixes for the user interface and file format handlers and a special splash
screen to commemorate the big day
- fix-glossary.patch, support-sphinx3.patch: drop (upstream)
- remove get-source.sh: the binaries that needed to be repackaged
are no longer in the upstream release tarball
- fix-return-statement.patch: refresh against new release
-------------------------------------------------------------------
Mon Jun 29 11:27:50 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Add patch to support transforming bitmap glyphs from python
with one of the predefined transformations in fontforge.
* add-bitmap-transform-support.patch
(boo#1169444)
-------------------------------------------------------------------
Mon May 25 19:11:37 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
- add support-sphinx3.patch and fix-glossary.patch to allow
python-Sphinx >= 3
gh#fontforge/fontforge#4269
gh#fontforge/fontforge#4284
-------------------------------------------------------------------
Wed Apr 15 18:30:12 UTC 2020 - Antonio Larrosa <alarrosa@suse.com>
- Update to version 20200314:
* FontForge now has much improved stroke expansion functionality.
The main change is that it actually works most of the time. New
features include support for arbitrary convex nibs and the
miter-clip and arc join styles from SVG 2. All functionality is
accessible from the Python and native APIs.
* Remove overlap handles certain important edge cases better.
* The Python API now has a function called genericGlyphChange
that matches the "Change Glyph" command in the GUI. See #4133
for more details.
* The Python API now has functions for getting Unicode script and
for interrogating glyph boundaries.
* One can now use text flags (rather than just numerical flags)
when opening a font file via the Python API.
* UFO import now outputs the note field properly.
* SVG import is much more robust.
* We have dropped most gnulib and autotools logic in favor of
CMake, which dramatically simplifies the build system and just
as dramatically improves build time.
* As part of the switch to CMake, per the deprecation of
Python 2, and per the lack of objections to the proposal on
the mailing list, we have dropped support for building
FontForge with Python 2 support. The non-build-system Python 2
code remains, but it is neither tested nor maintained nor
supported and is likely to follow a trajectory of decay and
then removal.
* Documentation is now rendered in Sphinx, which makes
maintenance and improvement easier.
* Translations now happen on crowdin, which makes contributions
easier.
* We got such a contribution for Croatian.
* Character view point coloring is more consistent, and preview
fills support transparency.
* The user can now move and close tabs in the character view.
* The metrics view now allows for entry of negative kerning
values and runs a bit more smoothly.
* There is now a warning when a user is about to discard an
unsaved script.
* We fixed bugs all over, as always, with particular attention
given to the metrics view, Python, Spiro, and high-resolution
displays.
* Notes on build system changes:
+ libgutils and libgunicode have been combined into
libfontforge
+ libgdraw and libfontforgeexe have been combined into the
fontforge executable itself
+ No development files are installed (headers, or pkg-config).
This is because we do not provide a stable API or ABI to work
against, nor are the headers actually well configured to be
used externally. We are also not aware of any maintained
product that compiles against FontForge itself.
* Fixes use-after-free (heap) in the SFD_GetFontMetaData()
function and fix NULL pointer dereference in the
SFDGetSpiros() and SFD_AssignLookups() function(bnc#1160220,
bnc#1160236, CVE-2020-5395, CVE-2020-5496).
- Drop patch that isn't needed anymore:
* python38_config.patch
- Add patches to fix build:
* fix-return-statement.patch
* fix-sphinx-doc.patch (only for Leap 15.2)
-------------------------------------------------------------------
Wed Oct 30 13:28:56 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- add python38_config.patch to build with python-3.8
- spec-cleaned
-------------------------------------------------------------------
Wed Aug 21 12:36:23 UTC 2019 - pgajdos@suse.com
- version update to 20190801 [bsc#1145185]
* Bugfixes
* Added Croatian translation
* Added user decompositions
* New graphic for the splash/about screen
* Images embedded in SFDs are now serialised as PNGs
* Both the Windows and Mac builds are now built with Python 3 instead of Python 2.
* The minimum supported version for the Mac build is now MacOS Sierra (10.12)
* FontForge no longer uses gnulib
* collab support has been removed
* Complete GDK support, enabled by default on Windows and Macintosh, from @jtanx.
* Enhanced UFO 3 support, with separate import/export paths for UFO 2 and UFO 3,
from @frank-trampe. See the technical bulletin here for more information.
* Improved feature file support, from @skef and @khaledhosny.
* WOFF2 support, from @jtanx.
* Unicode 12.1.0 support, from @JoesCat.
* Extended Python interfaces, from @skef.
- modified patches
% fontforge-version.patch (refreshed)
- deleted patches
- reproducible.patch (upstreamed)
-------------------------------------------------------------------
Wed Aug 1 03:37:01 UTC 2018 - bwiedemann@suse.com
- Add reproducible.patch to override font build dates (boo#1047218)
- repack sources to .xz since we have to repack already
-------------------------------------------------------------------
Mon Dec 18 10:41:08 UTC 2017 - pgajdos@suse.com
- updated to 20170731
* This incorporates a large number of adjustments and fixes.
-------------------------------------------------------------------
Thu Nov 9 19:06:46 UTC 2017 - jmatejek@suse.com
- switch to python 3
-------------------------------------------------------------------
Fri Dec 9 14:15:44 UTC 2016 - pgajdos@suse.com
- updated to 20161005 [bsc#1014793]:
* This release introduces a new icon set, new functionality for
custom icon selection graphics, support for GlyphOrderAndAliasDB
files, and support for Unicode 9.0.
* It also fixes a number of small bugs relating to certain bitmap
typefaces, stroke expansion, handling of CID ranges, and the
user interface.
- removed upstreamed patches:
- propagate-creation-and-modification-times-to-ttf.patch
- fontforge-eof-crash.patch
-------------------------------------------------------------------
Tue Jan 26 08:10:44 UTC 2016 - pgajdos@suse.com
- do not crash on invalid input data (when eof reached) [bsc#963023]
+ fontforge-eof-crash.patch
-------------------------------------------------------------------
Wed Dec 16 14:03:36 UTC 2015 - pgajdos@suse.com
- updated to 20150824: This fixes a few bugs, including some in
U. F. O. kerning classes and FreeType rasterization, and adds
a Korean translation.
-------------------------------------------------------------------
Mon May 11 08:36:20 UTC 2015 - pgajdos@suse.com
- updated to 20150430: this release includes a few bug fixes,
performance enhancements, and refreshed icons.
- download uthash when get-source.sh
- fontforge --version now returns fontforge release version
+ fontforge-version.patch
-------------------------------------------------------------------
Fri May 1 13:17:09 UTC 2015 - coolo@suse.com
- also repackage the broken gnulib links to fix build with
newer libtool
-------------------------------------------------------------------
Mon Apr 20 07:10:42 UTC 2015 - pgajdos@suse.com
- repack source [bnc#926061]
-------------------------------------------------------------------
Tue Mar 31 09:55:24 UTC 2015 - pgajdos@suse.com
- updated to 20150330:
* fixes a few crashes, enhances round-tripping of information in
certain file formats, and fixes some bad logic
* adds support for fine point adjustment
* etc. see https://github.com/fontforge/fontforge/releases
for details
- remove %requires_ge libpng16-16 as it seems fontforge is not so
picky anymore
- doc is generated
- remove pfaedit compat
- removed patches (upstreamed or not needed):
- fontforge-fixgiflib.patch
- fontforge-arraysubscript.patch
- fontforge-fdleak.patch
- fontforge-libpng.diff
- fontforge-docdir.patch
- fontforge-python-module-name.diff
-------------------------------------------------------------------
Thu Feb 5 08:45:26 UTC 2015 - coolo@suse.com
- added propagate-creation-and-modification-times-to-ttf.patch from
debian's reproducible build project to get reproducible font builds
-------------------------------------------------------------------
Thu Oct 2 22:54:57 UTC 2014 - crrodriguez@opensuse.org
- Cleanup BuildRequires, in particular do not use legacy
metapackage xorg-x11-devel
-------------------------------------------------------------------
Sat May 31 16:12:53 UTC 2014 - jengelh@inai.de
- Update fontforge-fixgiflib.patch to support giflib7-5.1
-------------------------------------------------------------------
Mon Mar 17 07:21:51 UTC 2014 - pgajdos@suse.com
- fixed linking against libpng (1.5, 1.6) [bnc#867041]
* added fontforge-libpng.diff
* removed libpng14-dynamic.diff
- spec file cleanup
* call spec-cleaner
* fontforge-20090622-fdleak.patch renamed to fontforge-fdleak.patch
* docdir.patch renamed to fontforge-docdir.patch
-------------------------------------------------------------------
Sun Mar 9 13:40:08 UTC 2014 - schwab@linux-m68k.org
- fontforge-arraysubscript.patch: Fix invalid array subscript
-------------------------------------------------------------------
Thu Nov 14 06:59:13 UTC 2013 - jengelh@inai.de
- Put documentation into a separate subpackage
- Spruce of description of fontforge-devel a bit
- File list simplification/exactness
-------------------------------------------------------------------
Mon Sep 9 08:48:04 UTC 2013 - coolo@suse.com
- add fontforge-fixgiflib.patch to fix build with giflib 5.0.5
-------------------------------------------------------------------
Tue Apr 16 12:17:30 UTC 2013 - pgajdos@suse.com
- use %requires_eq rather than %requires_ge (exact version)
-------------------------------------------------------------------
Tue Apr 16 12:05:41 UTC 2013 - pgajdos@suse.com
- %requires_ge libpng16-16 to avoid
'Application built with libpng-1.5.14 but running with 1.6.1'
warning when running fontforge
-------------------------------------------------------------------
Fri Jan 4 12:44:05 UTC 2013 - dmitry_r@opensuse.org
- Build with cairo and pango support
-------------------------------------------------------------------
Sun Dec 30 06:44:35 UTC 2012 - dmitry_r@opensuse.org
- Update to 20120731b
* see included changelog.html for details
* removed obsolete fontforge.py27.diff
* removed obsolete fontforge-missing-closedir.diff
* removed obsolete libpng14.diff
-------------------------------------------------------------------
Tue Dec 20 20:25:40 UTC 2011 - coolo@suse.com
- remove call to suse_update_config (very old work around)
-------------------------------------------------------------------
Mon Oct 3 07:55:35 UTC 2011 - pgajdos@suse.com
- Make rpmlint more happy.
-------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de
- Apply packaging guidelines (remove redundant/obsolete
tags/sections from specfile, etc.)
-------------------------------------------------------------------
Mon May 16 14:38:39 CEST 2011 - pgajdos@suse.cz
- updated to 20110222:
* Did a lot of work to improve the accuracy in remove overlap.
* Fix various error messages.
* Remove some obsolete documentation.
* Technical fixes to stroking code.
* Add a miterlimit to stroking code.
* FontForge was using the wrong MIME type for svg files.
W3C has changed it and it's now "image/svg+xml" not
"image/svg-xml" or "image/svg".
* etc. on
http://fontforge.sourceforge.net/changelog.html
* libpng14.diff and fontforge.py27.diff kept but not needed yet
-------------------------------------------------------------------
Mon Sep 6 08:54:57 UTC 2010 - coolo@novell.com
- adapt to python 2.7
-------------------------------------------------------------------
Thu Apr 8 10:56:13 CEST 2010 - tiwai@suse.de
- fix build with older distros before libpng 1.4
-------------------------------------------------------------------
Thu Apr 8 08:12:59 UTC 2010 - coolo@novell.com
- compile with libpng 1.4
-------------------------------------------------------------------
Mon Apr 5 12:00:54 UTC 2010 - toms@suse.de
- Updated to 20090923
- Enabled Python bindings
-------------------------------------------------------------------
Sat Oct 3 12:16:21 UTC 2009 - crrodriguez@opensuse.org
- fontforge-20090622-1.6: missing call to closedir [bnc#543458]
- fix -devel package dependencies
-------------------------------------------------------------------
Mon Jul 27 16:57:52 CEST 2009 - tiwai@suse.de
- fix missing closedir() (bnc#525022)
-------------------------------------------------------------------
Mon Jul 27 15:29:55 CEST 2009 - tiwai@suse.de
- updated to version 20090622
lots of changes. See changelog.html for details
-------------------------------------------------------------------
Thu Jan 22 00:51:12 CET 2009 - crrodriguez@suse.de
- remove "la" files and static libraries
- add missing freetype2-devel dependency to -devel package
-------------------------------------------------------------------
Mon May 26 12:58:18 CEST 2008 - mfabian@suse.de
- bnc#246804: update to 20080429 (needed to build recent versions
of the DejaVu fonts and freefont).
-------------------------------------------------------------------
Fri Feb 29 10:03:29 CET 2008 - coolo@suse.de
- fix typo
-------------------------------------------------------------------
Thu Feb 21 17:47:55 CET 2008 - mfabian@suse.de
- update to 20080203 (bugfix release, fixes also bnc#363014).
- create -devel sub-package.
-------------------------------------------------------------------
Thu Aug 02 16:33:43 CEST 2007 - mfabian@suse.de
- update to 20070723 (user interace redesigned, many bugfixes).
- add ldconfig post scripts.
- remove executable flags from documentation.
- remove DOS line-endings from documentation.
-------------------------------------------------------------------
Tue Jul 24 12:49:54 CEST 2007 - coolo@suse.de
- remove BuildPreRequires
-------------------------------------------------------------------
Tue Feb 06 17:06:16 CET 2007 - mfabian@suse.de
- Bugzilla #242363: uninitialized variable.
-------------------------------------------------------------------
Wed Jan 03 11:43:21 CET 2007 - mfabian@suse.de
- update to 20061220.
- remove fontforge-strncat.patch,
bugzilla-221210-locale-variable-used-before-set.patch,
bugzilla-225616-local-variable-used-before-set.patch
(included upstream).
- fix bugzilla #231126: "array subscript out of range".
-------------------------------------------------------------------
Tue Dec 19 18:40:01 CET 2006 - mfabian@suse.de
- update to 20061025.
• fontimage program has been added.
- fix bugzilla #225616 ("local variable used before set").
-------------------------------------------------------------------
Fri Nov 17 19:54:59 CET 2006 - mfabian@suse.de
- Bugzilla #221210: "local variable used before set"
-------------------------------------------------------------------
Mon Nov 6 00:28:15 CET 2006 - ro@suse.de
- fix permissions on icon file
- fix gcc warning for strncat
-------------------------------------------------------------------
Tue Oct 17 14:25:48 CEST 2006 - mfabian@suse.de
- update to 20061014.
remove bugzilla-203490-local-variable-used-before-set.patch
(included upstream).
- Fix Bugzilla #211543 ("array subscript out of range).
- Fix invalid operation (like x = x++;)
-------------------------------------------------------------------
Thu Sep 07 12:12:47 CEST 2006 - mfabian@suse.de
- fix bugzilla #203490: "local variable used before set".
- add Japanese documentation.
-------------------------------------------------------------------
Wed Sep 06 17:26:27 CEST 2006 - mfabian@suse.de
- update to 20060822.
remove bugzilla-197499-local-variable-used-before-set.patch
(included upstream).
-------------------------------------------------------------------
Thu Aug 10 16:29:49 CEST 2006 - mfabian@suse.de
- Bugzilla 197499: "local variable used before set".
-------------------------------------------------------------------
Tue Jul 18 12:55:55 CEST 2006 - mfabian@suse.de
- update to 20060715.
fixes a crash when building freefont.
-------------------------------------------------------------------
Fri Mar 17 15:46:54 CET 2006 - mfabian@suse.de
- Bugzilla #158759: "locale variable used before set".
(already fixed in latest upstream version).
-------------------------------------------------------------------
Thu Mar 09 17:02:39 CET 2006 - mfabian@suse.de
- Bugzilla #153958: "array subscript out of range".
(already fixed in latest upstream version).
-------------------------------------------------------------------
Wed Jan 25 21:35:58 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Sun Oct 2 15:06:38 CEST 2005 - stbinner@suse.de
- fix capitalization of .desktop GenericName entry
-------------------------------------------------------------------
Thu Aug 04 17:31:55 CEST 2005 - mfabian@suse.de
- update to 20050803.
cannot update documentation because the download link for the
documentation is currently dead.
-------------------------------------------------------------------
Wed May 11 12:31:06 CEST 2005 - mfabian@suse.de
- update to 20050502.
- all .html and .png files should have mode 644.
- fix fontforge.desktop file (thanks to
Thomas Schraitle<thomas.schraitle@suse.de>).
-------------------------------------------------------------------
Tue Dec 14 21:27:40 CET 2004 - hvogel@suse.de
- install icon
-------------------------------------------------------------------
Thu Nov 11 12:48:59 CET 2004 - ro@suse.de
- fixed file list
-------------------------------------------------------------------
Wed Aug 18 18:30:54 CEST 2004 - mfabian@suse.de
- rename: PfaEdit -> fontforge (has been renamed upstream).
- update to 20040808.
-------------------------------------------------------------------
Mon Apr 26 00:16:16 CEST 2004 - ro@suse.de
- use no-strict-aliasing
-------------------------------------------------------------------
Thu Feb 26 15:27:52 CET 2004 - mfabian@suse.de
- update to 040224.
-------------------------------------------------------------------
Sat Jan 10 15:11:21 CET 2004 - adrian@suse.de
- build as user
-------------------------------------------------------------------
Sat Aug 23 17:12:17 CEST 2003 - mfabian@suse.de
- make it build on older distributions.
-------------------------------------------------------------------
Mon Aug 18 12:17:35 CEST 2003 - mfabian@suse.de
- update to 030817.
- add desktop file.
-------------------------------------------------------------------
Fri May 16 15:53:29 CEST 2003 - mfabian@suse.de
- update binaries and documentation to 030512
- add .so and .la file to file list
- add "freetype2 freetype2-devel" to neededforbuild
-------------------------------------------------------------------
Wed Feb 12 11:31:46 CET 2003 - mfabian@suse.de
- update binaries and documentation to 030211
-------------------------------------------------------------------
Wed Nov 13 18:12:20 CET 2002 - mfabian@suse.de
- update to 021105
- use x-devel-packages instead of xf86 in # neededforbuild
- use dynamic linking
-------------------------------------------------------------------
Tue Oct 22 21:49:47 CEST 2002 - mfabian@suse.de
- update to 021021 and update documentation to 020910.
-------------------------------------------------------------------
Fri Jul 26 18:12:53 CEST 2002 - mfabian@suse.de
- update to version 020724
- include documentation, remove cidmaps.tar.bz2 and use updated
cidmaps.tgz from the documentation tar ball
-------------------------------------------------------------------
Fri Feb 1 00:26:11 CET 2002 - ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
-------------------------------------------------------------------
Tue Jan 22 14:47:41 CET 2002 - mfabian@suse.de
- update to version 020121.
- updated cidmaps.tar.bz2
-------------------------------------------------------------------
Wed Sep 5 19:24:25 CEST 2001 - mfabian@suse.de
- adapted for SuSE, version 010905
-------------------------------------------------------------------
Thu May 10 2001 - George Williams <gww@silcom.com>
- My first attempt at rpm, updated to 10 May sources
-------------------------------------------------------------------
Tue May 01 2001 - Scott Pakin <pakin@uiuc.edu>
- Removed (unused) dynamic library files
-------------------------------------------------------------------
Sun Apr 29 2001 - Scott Pakin <pakin@uiuc.edu>
- Upgraded from 220401 to 280401.
-------------------------------------------------------------------
Tue Apr 24 2001 - Scott Pakin <pakin@uiuc.edu>
- Upgraded from 190401 to 220401.
-------------------------------------------------------------------
Fri Apr 20 2001 - Scott Pakin <pakin@uiuc.edu>
- Upgraded from 020401 to 190401.
-------------------------------------------------------------------
Tue Apr 10 2001 - Scott Pakin <pakin@uiuc.edu>
- Upgraded from 210301 to 020401.
-------------------------------------------------------------------
Thu Mar 22 2001 Scott Pakin <pakin@uiuc.edu>
- Initial release

141
fontforge.spec Normal file
View File

@ -0,0 +1,141 @@
#
# spec file for package fontforge
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: fontforge
Version: 20230101
Release: 0
Summary: A Font Editor
License: GPL-3.0-or-later
URL: https://fontforge.org/
Source0: https://github.com/fontforge/fontforge/archive/%{version}.tar.gz
# workaround for bug 930076, imho upstream should fix this
# https://github.com/fontforge/fontforge/issues/2270
Patch0: fontforge-version.patch
Patch1: add-bitmap-transform-support.patch
# PATCH-FIX-UPSTREAM fontforge-CVE-2024-25081-CVE-2024-25082.patch CVE-2024-25081 CVE-2024-25082 bsc#1220404 bsc#1220405 qzhao@suse.com -- Fix Splinefont shell invocation.
Patch2: fontforge-CVE-2024-25081-CVE-2024-25082.patch
Patch3: https://github.com/fontforge/fontforge/commit/642d8a3db6d4bc0e70b429622fdf01ecb09c4c10.patch
# PATCH-FIX-UPSTREAM: taken from https://github.com/fontforge/fontforge/commit/8c75293e924602ed09a9481b0eeb67ba6c623a81
Patch4: use-sysconfig-not-distutils.patch
BuildRequires: cairo-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: fontconfig-devel
BuildRequires: freetype2-devel
BuildRequires: gcc-c++
BuildRequires: gettext-tools
BuildRequires: giflib-devel
BuildRequires: git
BuildRequires: gtk3-devel
BuildRequires: hicolor-icon-theme
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: pango-devel
BuildRequires: pkgconfig
BuildRequires: python3-Sphinx
BuildRequires: python3-devel
BuildRequires: readline-devel
BuildRequires: update-desktop-files
BuildRequires: woff2-devel
BuildRequires: zlib-devel
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xi)
%if 0%{?suse_version} > 1210
BuildRequires: libspiro-devel
%endif
%description
FontForge allows editing of outline and bitmap fonts. With it, you can
create new fonts or modify old ones. It also converts font formats and
can convert among PostScript (ASCII & binary Type 1, some Type 3s, and
some Type 0s), TrueType, OpenType (Type2), and CID-keyed fonts.
%package doc
Summary: Documentation for FontForge
%if 0%{?suse_version} >= 1230
BuildArch: noarch
%endif
%description doc
FontForge allows editing of outline and bitmap fonts. With it, you can
create new fonts or modify old ones. It also converts font formats and
can convert among PostScript, TrueType, OpenType, and CID-keyed fonts.
This subpackage contains the documentation to FontForge.
%package devel
Summary: Include Files and Libraries mandatory for Development
Requires: %{name} = %{version}
Requires: freetype2-devel
%description devel
FontForge allows editing of outline and bitmap fonts. With it, you can
create new fonts or modify old ones. It also converts font formats and
can convert among PostScript, TrueType, OpenType, and CID-keyed fonts.
This subpackage contains all necessary include files and libraries needed
to develop applications that use FontForge libraries.
%prep
%autosetup -p1
%build
%cmake \
-DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name}/html
%install
%cmake_install
%suse_update_desktop_file -i org.fontforge.FontForge VectorGraphics
%find_lang FontForge
find %{buildroot} -type f -name "*.la" -delete -print
rm %{buildroot}%{_docdir}/%{name}/html/.buildinfo
rm %{buildroot}%{_docdir}/%{name}/html/.nojekyll
%fdupes -s %{buildroot}%{_datadir}/%{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f FontForge.lang
%license LICENSE COPYING.gplv3
%exclude %{_docdir}/%{name}/html
%{_mandir}/man1/*.1%{?ext_man}
%{_bindir}/*
%{_libdir}/lib*.so.*
%{_datadir}/fontforge/
%{python3_sitearch}/*
%{_datadir}/applications/org.fontforge.FontForge.desktop
%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge.png
%{_datadir}/icons/hicolor/scalable/apps/org.fontforge.FontForge.svg
%{_datadir}/metainfo/org.fontforge.FontForge.*.xml
%{_datadir}/mime/packages/%{name}.xml
%dir %{_docdir}/fontforge
%files doc
%license LICENSE
%doc AUTHORS README.md
%doc %{_docdir}/%{name}/html
%files devel
%doc CONTRIBUTING.md
%{_libdir}/lib*.so
%changelog

View File

@ -0,0 +1,54 @@
From 8c75293e924602ed09a9481b0eeb67ba6c623a81 Mon Sep 17 00:00:00 2001
From: Maxim Iorsh <iorsh@users.sourceforge.net>
Date: Mon, 7 Oct 2024 11:44:00 +0300
Subject: [PATCH] Use sysconfig for Python module locations (#5423)
* Use sysconfig for Python module locations
* [TEMP] Use iorsh/fontforgebuilds repo
* [TEMP] Use iorsh/fontforgebuilds repo in Appveyor
* Update
* Revert "[TEMP] Use iorsh/fontforgebuilds repo in Appveyor"
This reverts commit 6fa80455b8b1e7cf43419c73e4de714f7925d9f8.
* test
* Cleanup
* test
* Removed debug prints
---------
Co-authored-by: Jeremy Tan <jtanx@outlook.com>
---
.github/workflows/main.yml | 24 +++++++++----------
.github/workflows/scripts/ffosxbuild.sh | 7 ++++--
.github/workflows/scripts/setup_linux_deps.sh | 2 +-
CMakeLists.txt | 6 -----
osx/CMakeLists.txt | 2 +-
pyhook/CMakeLists.txt | 5 +++-
6 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/pyhook/CMakeLists.txt b/pyhook/CMakeLists.txt
index dd48054aa7..53708f1099 100644
--- a/pyhook/CMakeLists.txt
+++ b/pyhook/CMakeLists.txt
@@ -20,8 +20,11 @@ target_link_libraries(psMat_pyhook PRIVATE Python3::Module)
# FindPython3 provides Python3_SITEARCH, but this is an absolute path
# So do it ourselves, getting the prefix-relative path instead
if(NOT DEFINED PYHOOK_INSTALL_DIR)
+ if(APPLE)
+ set(_PYHOOK_SYSCONFIG_PREFIX " 'posix_prefix',")
+ endif()
execute_process(
- COMMAND "${Python3_EXECUTABLE}" -c "import distutils.sysconfig as sc; print(sc.get_python_lib(prefix='', plat_specific=True,standard_lib=False))"
+ COMMAND "${Python3_EXECUTABLE}" -c "import sysconfig as sc; print(sc.get_path('platlib',${_PYHOOK_SYSCONFIG_PREFIX} vars={'platbase': '.'}))"
RESULT_VARIABLE _pyhook_install_dir_result
OUTPUT_VARIABLE PYHOOK_INSTALL_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)