diff --git a/.fontforge.metadata b/.fontforge.metadata new file mode 100644 index 0000000..426fa04 --- /dev/null +++ b/.fontforge.metadata @@ -0,0 +1,2 @@ +f7afd824640ed620790a20b14eb78b1e230fea10 SOURCES/fontforge-20170731.tar.gz +13b702314f26b56b81dc55adfe29468957002141 SOURCES/gnulib-2bf7326.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70c1bea --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/fontforge-20170731.tar.gz +SOURCES/gnulib-2bf7326.tar.gz diff --git a/SOURCES/Add-python3-support.patch b/SOURCES/Add-python3-support.patch new file mode 100644 index 0000000..32759fa --- /dev/null +++ b/SOURCES/Add-python3-support.patch @@ -0,0 +1,519 @@ +From b2c5de7835a753cad1f35db8202c4733b5fc2990 Mon Sep 17 00:00:00 2001 +From: Parag A Nemade +Date: Mon, 3 Oct 2016 12:56:29 +0530 +Subject: [PATCH] Add python3 support + +Signed-off-by: Parag A Nemade +--- + pycontrib/FontCompare/fc/BitmapHandler.py | 20 +++++++-------- + pycontrib/FontCompare/fc/DocCompare.py | 2 +- + pycontrib/FontCompare/fc/FontCompare.py | 2 +- + pycontrib/FontCompare/fc/GlyphConsistency.py | 2 +- + pycontrib/FontCompare/fontcompare | 2 +- + pycontrib/FontCompare/unittests/unittests.py | 18 ++++++------- + pycontrib/collab/web-test-collab.py | 2 +- + pycontrib/even.py | 2 +- + pycontrib/gdraw/__init__.py | 4 +-- + pycontrib/gdraw/gdraw.py | 20 +++++++-------- + pycontrib/graphicore.py | 4 +-- + pycontrib/graphicore/ipython_view.py | 13 +++++----- + pycontrib/graphicore/shell.py | 4 +-- + pycontrib/svg2sfd.py | 38 ++++++++++++++-------------- + pycontrib/webcollab.py | 6 ++--- + 15 files changed, 70 insertions(+), 69 deletions(-) + +diff --git a/pycontrib/FontCompare/fc/BitmapHandler.py b/pycontrib/FontCompare/fc/BitmapHandler.py +index d4d00da..c159128 100644 +--- a/pycontrib/FontCompare/fc/BitmapHandler.py ++++ b/pycontrib/FontCompare/fc/BitmapHandler.py +@@ -35,7 +35,7 @@ def white_bg_square(img): + "return a white-background-color image having the img in exact center" + size = (max(img.size),)*2 + layer = Image.new('1', size, 1) +- layer.paste(img, tuple(map(lambda x:(x[0]-x[1])/2, zip(size, img.size)))) ++ layer.paste(img, tuple([(x[0]-x[1])/2 for x in zip(size, img.size)])) + return layer + + class BitmapCompare: +@@ -73,13 +73,13 @@ class CreateSpriteSheet: + #seperate each image with lots of whitespace + master_height = pixelsize + oldfont = font +- print "the master image will by %d by %d" % (master_width, master_height) +- print "creating image..." ++ print("the master image will by %d by %d" % (master_width, master_height)) ++ print("creating image...") + master = Image.new( + mode='1', + size=(master_width, master_height), + color=0) # fully transparent +- print "created." ++ print("created.") + if effects == "italic": + font.selection.all() + font = font.italicize(-13) +@@ -92,16 +92,16 @@ class CreateSpriteSheet: + font[i].changeWeight(50,"auto",0,0,"auto") + font[i].export("temp.bmp",pixelsize,1) + img = Image.open("temp.bmp") +- print "adding %s at %d..." % (str(i)+".bmp", location), ++ print("adding %s at %d..." % (str(i)+".bmp", location), end=' ') + square_one = white_bg_square(img) + square_one.resize((pixelsize, pixelsize)) + master.paste(square_one,(location,0)) +- print "added." ++ print("added.") + except: +- print "ooopsy" ++ print("ooopsy") + count+=1 +- print "done adding pics." +- print "saving mastersprite.bmp..." ++ print("done adding pics.") ++ print("saving mastersprite.bmp...") + master.save('data/mastersprite'+effects+'.bmp' ) +- print "saved!" ++ print("saved!") + font.close() +diff --git a/pycontrib/FontCompare/fc/DocCompare.py b/pycontrib/FontCompare/fc/DocCompare.py +index 3a54bf9..df431e2 100644 +--- a/pycontrib/FontCompare/fc/DocCompare.py ++++ b/pycontrib/FontCompare/fc/DocCompare.py +@@ -41,7 +41,7 @@ class DocCompare: + bashcommand = "hb-view --output-format=\"png\" --output-file=\"/var/tmp/test.png\" --font-size="+str(fontsize)+" --text-file=\"" + bashcommand+=docpath+"\" "+"\""+testpath+"\"" + os.system(str(bashcommand)) +- print bashcommand ++ print(bashcommand) + thefile = pkg_resources.resource_filename("fc",mockfont.highresdocfile) + shutil.copy(thefile,"/var/tmp/standard.png") + cm = BitmapCompare() +diff --git a/pycontrib/FontCompare/fc/FontCompare.py b/pycontrib/FontCompare/fc/FontCompare.py +index f21718c..c82b788 100644 +--- a/pycontrib/FontCompare/fc/FontCompare.py ++++ b/pycontrib/FontCompare/fc/FontCompare.py +@@ -111,7 +111,7 @@ class FontCompare(object): + scores = list() + comparator = BitmapCompare() + pixelsize = (resolution*ptsize)/72 +- print spritepath ++ print(spritepath) + for i in range (glyphRange[0],glyphRange[1]): + if i in Testfont: + Testfont[i].export("/var/tmp/tmp.bmp",pixelsize,1) +diff --git a/pycontrib/FontCompare/fc/GlyphConsistency.py b/pycontrib/FontCompare/fc/GlyphConsistency.py +index 38273c9..d5265fa 100644 +--- a/pycontrib/FontCompare/fc/GlyphConsistency.py ++++ b/pycontrib/FontCompare/fc/GlyphConsistency.py +@@ -102,7 +102,7 @@ class GlyphConsistency: + for i in range (glyphrange[0],glyphrange[1]): + if i in font: + score = self.glyph_round_compare(font[i],pixelsize) +- print score ++ print(score) + set_round_score+=score + total+=1 + font.close() +diff --git a/pycontrib/FontCompare/fontcompare b/pycontrib/FontCompare/fontcompare +index e7e68d8..fdf7336 100755 +--- a/pycontrib/FontCompare/fontcompare ++++ b/pycontrib/FontCompare/fontcompare +@@ -15,7 +15,7 @@ + along with this program. If not, see . + """ + +-#! /usr/bin/python ++#! /usr/bin/python3 + from PyQt4.QtGui import QMessageBox + from PyQt4.QtGui import QMainWindow + from PyQt4.QtGui import QApplication +diff --git a/pycontrib/FontCompare/unittests/unittests.py b/pycontrib/FontCompare/unittests/unittests.py +index 18e1e95..d8a1190 100644 +--- a/pycontrib/FontCompare/unittests/unittests.py ++++ b/pycontrib/FontCompare/unittests/unittests.py +@@ -55,7 +55,7 @@ class Basictests(unittest.TestCase): + for tup in basic: + if tup[1]!=10: + bastest=0 +- self.failUnless(bastest) ++ self.assertTrue(bastest) + testfont = fontforge.open("unittests/lohit.ttf") + bold = cm.font_facecompare(testfont,mockfont,(0x900,0x97f),\ + 600,12,1,"bold") +@@ -66,28 +66,28 @@ class Basictests(unittest.TestCase): + normal = cm.font_facecompare(testfont,mockfont,(0x900,0x97f),\ + 600,12,1,"normal") + test = 1 +- print len(normal) ++ print(len(normal)) + for tup in bold: + if tup[1]==100 or tup[1]==0: + test1=1 + break +- self.failUnless(test) ++ self.assertTrue(test) + test = 0 + for tup in italic: + if tup[1]==100 or tup[1]==0: + test=1 + break +- self.failUnless(test is 1) ++ self.assertTrue(test is 1) + test = 0 + for tup in normal: + if tup[1]==100 or tup[1]==0: + test=1 + break +- self.failUnless(test is 1) ++ self.assertTrue(test is 1) + test = 0 + if len(normal) == len(bold) == len(italic): + test = 1 +- self.failUnless(test is 1) ++ self.assertTrue(test is 1) + + def testGlyphConsistency(self): + cm = GlyphConsistency() +@@ -99,11 +99,11 @@ class Basictests(unittest.TestCase): + test3 = cm.glyph_round_consistency(testfont,(0x900,0x97f),50) + + test = (0 <= test1[0][1] <= 10) +- self.failUnless(test) ++ self.assertTrue(test) + test2 = (0 <= test2 <= 10) +- self.failUnless(test2) ++ self.assertTrue(test2) + test3 = (0 <= test3 <= 10) +- self.failUnless(test3) ++ self.assertTrue(test3) + + """ + unittests for DocCompare not required. +diff --git a/pycontrib/collab/web-test-collab.py b/pycontrib/collab/web-test-collab.py +index 47b763f..b19f930 100755 +--- a/pycontrib/collab/web-test-collab.py ++++ b/pycontrib/collab/web-test-collab.py +@@ -68,7 +68,7 @@ def OnCollabUpdate(f): + "end": "null" # this is simply so we dont have to manage keeping the last item with no terminating , + }, + sort_keys=True, indent=4, separators=(',', ': ')) +- print js ++ print(js) + fi = open(fontJsonOnDisk, 'w') + fi.write(js) + +diff --git a/pycontrib/even.py b/pycontrib/even.py +index 96f9128..4f30fcb 100755 +--- a/pycontrib/even.py ++++ b/pycontrib/even.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + """ + running even from the fontforge menu +diff --git a/pycontrib/gdraw/__init__.py b/pycontrib/gdraw/__init__.py +index d47976c..dde7ea8 100644 +--- a/pycontrib/gdraw/__init__.py ++++ b/pycontrib/gdraw/__init__.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # vim:ts=8:sw=4:expandtab:encoding=utf-8 + ''' + Copyright 2009 +@@ -22,7 +22,7 @@ Copyright 2009 + __all__ = ['Timer', 'GtkRunner', 'gtkrunner'] + __version__ = '0.1' + +-from gdraw import * ++from .gdraw import * + + def main(): + pass +diff --git a/pycontrib/gdraw/gdraw.py b/pycontrib/gdraw/gdraw.py +index f2d5e50..8b6e693 100755 +--- a/pycontrib/gdraw/gdraw.py ++++ b/pycontrib/gdraw/gdraw.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + '''ctypes wrapper to Attach the GDraw event handler to the gtk main loop. + + Copyright 2009 +@@ -67,7 +67,7 @@ def setup_syspath(modpath="modules"): + + __all__ = ['Timer', 'GtkRunner', 'gtkrunner'] + +-from _gdraw import * ++from ._gdraw import * + from ctypes import * + import types + +@@ -111,7 +111,7 @@ class Timer: + + return + def dodo(*args): +- print 'aaa' ++ print('aaa') + return False + self.add(1000, dodo) + +@@ -122,7 +122,7 @@ class Timer: + + def _event_handler(self, gw, event): + evt = event.contents +- print "_event_handler()" ++ print("_event_handler()") + if evt.type == et_timer: + timer = evt.u.timer.timer + tkey = addressof(timer.contents) +@@ -147,7 +147,7 @@ class Timer: + ci.func = CallBackFunc(func) + ci.data = data + +- print "timer.add timeout", timeout ++ print("timer.add timeout", timeout) + frequency = 1 # Use return value of func() to decide repeat like gtk. + timer = GDrawRequestTimer(self.win, timeout, timeout, byref(ci)) + +@@ -190,7 +190,7 @@ class GtkRunner: + + def _do_main(self, *args): + '''The function called by the gdraw timeout handler.''' +- print "do_main" ++ print("do_main") + while gtk.events_pending(): + gtk.main_iteration(False) + return True +@@ -207,15 +207,15 @@ class GtkRunner: + self.gtk_timer = None + + def OnDestroyWindow(self, widget, fd ): +- print fd ++ print(fd) + fontforge.removeGtkWindowToMainEventLoopByFD( fd ) + self.stop() + return True + + def sniffwindow(self,w): + '''sniff key presses for a gtk window''' +- print "sniffwindow w", w +- print "sniff active font:", fontforge.activeFont() ++ print("sniffwindow w", w) ++ print("sniff active font:", fontforge.activeFont()) + w.connect("key-release-event", self._do_main) + fontforge.addGtkWindowToMainEventLoop(w.window.xid) + fd = fontforge.getGtkWindowMainEventLoopFD(w.window.xid) +@@ -223,7 +223,7 @@ class GtkRunner: + + def sniffwindowid(self,xid): + '''sniff key presses for a gtk window''' +- print "sniffwindowid xid", xid ++ print("sniffwindowid xid", xid) + #w.connect("key-release-event", self._do_main) + + def start(self, timeout=GTIMEOUT): +diff --git a/pycontrib/graphicore.py b/pycontrib/graphicore.py +index f95e488..229a2b7 100755 +--- a/pycontrib/graphicore.py ++++ b/pycontrib/graphicore.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + """ + running the fontforge scripts in the graphicore folder on fontforge startup +@@ -22,4 +22,4 @@ sys.path.append(os.path.dirname(sys.modules[__name__].__file__)) + sys.path.reverse(); + + #load the modules +-import graphicore.shell +\ No newline at end of file ++import graphicore.shell +diff --git a/pycontrib/graphicore/ipython_view.py b/pycontrib/graphicore/ipython_view.py +index f39eedb..2b77395 100644 +--- a/pycontrib/graphicore/ipython_view.py ++++ b/pycontrib/graphicore/ipython_view.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + ''' + Provides IPython console widget. + +@@ -17,10 +17,11 @@ import re + import sys + import os + import pango +-from StringIO import StringIO +-import thread ++from io import StringIO ++import _thread + + import IPython ++from functools import reduce + + class IterableIPShell: + ''' +@@ -118,7 +119,7 @@ class IterableIPShell: + ''' + This function updates namespace with sys.modules + ''' +- for k,v in sys.modules.items(): ++ for k,v in list(sys.modules.items()): + if not '.' in k: + self.IP.user_ns.update({k:v}) + +@@ -271,11 +272,11 @@ class IterableIPShell: + @type header: string + ''' + stat = 0 +- if verbose or debug: print header+cmd ++ if verbose or debug: print(header+cmd) + # flush stdout so we don't mangle python's buffering + if not debug: + input, output = os.popen4(cmd) +- print output.read() ++ print(output.read()) + output.close() + input.close() + +diff --git a/pycontrib/graphicore/shell.py b/pycontrib/graphicore/shell.py +index 5d102f7..32fa584 100755 +--- a/pycontrib/graphicore/shell.py ++++ b/pycontrib/graphicore/shell.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + """ + FontForge Interactive Python Shell +@@ -32,7 +32,7 @@ if len(sys.argv) == 0: + # some versions of IPython need content in sys.argv + sys.argv.append('') + +-from ipython_view import * ++from .ipython_view import * + import gdraw + + def runShell(data = None, glyphOrFont = None): +diff --git a/pycontrib/svg2sfd.py b/pycontrib/svg2sfd.py +index e1fc0ac..e23cb15 100644 +--- a/pycontrib/svg2sfd.py ++++ b/pycontrib/svg2sfd.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # + # Copyright 2013 Google Inc. All rights reserved. + # +@@ -49,7 +49,7 @@ def print_one_cmd(cmd, args): + result.append('%f' % (scale * args[i])) + result.append(cmd) + result.append('0') # TODO: should mark corner points +- print ' '.join(result) ++ print(' '.join(result)) + + def apply_rel_xy(xy, args): + x0, y0 = xy +@@ -75,7 +75,7 @@ def path_to_sfd(path): + for i in range(num_args_cmd(cmd)): + m = fre.match(path) + if m is None: +- print 'no float match:', path ++ print('no float match:', path) + args.append(float(m.group(1))) + path = path[m.end():] + #print cmd, args +@@ -128,13 +128,13 @@ def conv_svg(fn, char, glyphnum = None): + if glyphnum == None: + glyphnum = lastglyphnum + 1 + lastglyphnum = glyphnum +- print 'StartChar:', os.path.basename(fn)[:-4] +- print 'Encoding: %d %d %d' % (char, glyphnum, char) +- print 'Width: %d' % (21 * 40) +- print 'Flags: W' +- print 'LayerCount: 2' +- print 'Fore' +- print 'SplineSet' ++ print('StartChar:', os.path.basename(fn)[:-4]) ++ print('Encoding: %d %d %d' % (char, glyphnum, char)) ++ print('Width: %d' % (21 * 40)) ++ print('Flags: W') ++ print('LayerCount: 2') ++ print('Fore') ++ print('SplineSet') + doc = xml.dom.minidom.parse(fn) + # TODO: reverse paths if fill color is white-ish (this is more code, + # and in the meantime, we'll rely on correct path direction in FF) +@@ -147,16 +147,16 @@ def conv_svg(fn, char, glyphnum = None): + cy = float(circle.getAttribute('cy')) + r = float(circle.getAttribute('r')) + circle_to_sfd(cx, cy, r) +- print 'EndSplineSet' +- print 'EndChar' ++ print('EndSplineSet') ++ print('EndChar') + + def print_header(): + global header_printed +- print '''SplineFontDB: 3.0 ++ print('''SplineFontDB: 3.0 + FontName: %s + FullName: %s +-FamilyName: %s''' % (font_name, font_name, font_name) +- print '''Weight: Medium ++FamilyName: %s''' % (font_name, font_name, font_name)) ++ print('''Weight: Medium + Copyright: Copyright (C) 2011 Google Inc. + Version: 001.000 + UnderlinePosition: -120 +@@ -180,12 +180,12 @@ HheadAOffset: 0 + HheadDescent: 200 + HheadDOffset: 0 + BeginChars: 57600 57600 +-''' ++''') + header_printed = True + + def print_footer(): +- print '''EndChars +-EndSplineFont''' ++ print('''EndChars ++EndSplineFont''') + + def parse_int(x): + if x.startswith('0x'): +@@ -197,7 +197,7 @@ def run_file(fn): + global char_num + global font_name + directory = '' +- for l in file(fn).xreadlines(): ++ for l in file(fn): + if l.startswith('#'): + continue + s = l.strip().split() +diff --git a/pycontrib/webcollab.py b/pycontrib/webcollab.py +index 9ee0f17..4be07ec 100755 +--- a/pycontrib/webcollab.py ++++ b/pycontrib/webcollab.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + """ + running web collab server hooks +@@ -44,8 +44,8 @@ def startWebServerInCollabMode(data = None, glyphOrFont = None): + global child + global childNodejs + ensureChildClosed() +- print("FONTFORGE:" + FONTFORGE) +- print("script path:" + collabpath + "web-test-collab.py") ++ print(("FONTFORGE:" + FONTFORGE)) ++ print(("script path:" + collabpath + "web-test-collab.py")) + child = subprocess.Popen( [ FONTFORGE, "-forceuihidden", "-script", collabpath + "web-test-collab.py" ] ) + # + # start the nodejs server +-- +2.9.3 + diff --git a/SOURCES/fontforge-20140813-use-system-uthash.patch b/SOURCES/fontforge-20140813-use-system-uthash.patch new file mode 100644 index 0000000..e5a0b4b --- /dev/null +++ b/SOURCES/fontforge-20140813-use-system-uthash.patch @@ -0,0 +1,30 @@ +--- ./Makefile.am.old 2014-08-12 10:07:32.000000000 +0530 ++++ ./Makefile.am 2014-09-08 16:23:56.046996941 +0530 +@@ -43,7 +43,6 @@ + AM_CPPFLAGS = + AM_LDFLAGS = + +-BUILT_SOURCES = uthash/src + EXTRA_DIST = + CLEANFILES = + MOSTLYCLEANFILES = +@@ -113,7 +112,6 @@ + Packaging/FontForge-doc.spec \ + Packaging/FontForge.spec \ + Packaging/FontForge.static.spec \ +- uthash/src \ + $(NULL) + + #-------------------------------------------------------------------------- +@@ -129,11 +127,6 @@ + + + #-------------------------------------------------------------------------- +-uthash/src: +- if [ ! -e uthash/src ]; then \ +- if [ -e uthash ] ; then rm -r uthash ; fi ; \ +- git clone https://github.com/troydhanson/uthash ; \ +- fi ; + + # We import a selection of targets from Frank's standard packaging Makefile. + diff --git a/SOURCES/fontforge-20170731-covscan-issue-fix.patch b/SOURCES/fontforge-20170731-covscan-issue-fix.patch new file mode 100644 index 0000000..064a710 --- /dev/null +++ b/SOURCES/fontforge-20170731-covscan-issue-fix.patch @@ -0,0 +1,2683 @@ +diff -urN fontforge-20170731.old/fontforge/asmfpst.c fontforge-20170731/fontforge/asmfpst.c +--- fontforge-20170731.old/fontforge/asmfpst.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/asmfpst.c 2018-09-23 14:50:31.558567689 +0530 +@@ -810,13 +810,16 @@ + match_len = j; + + for ( i=0; i=max ) +@@ -251,6 +255,8 @@ + } else { + if ( fscanf(plate,"%lg %lg )", &spiros[cnt].x, &spiros[cnt].y)!=2 ) { + ff_post_error( _("Not a plate file"), _("This does not seem to be a plate file\nExpected two real numbers")); ++ free(head); ++ free(spiros); + return; + } + ++cnt; +diff -urN fontforge-20170731.old/fontforge/cvundoes.c fontforge-20170731/fontforge/cvundoes.c +--- fontforge-20170731.old/fontforge/cvundoes.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/cvundoes.c 2018-09-23 14:50:31.559567674 +0530 +@@ -2637,6 +2637,7 @@ + adjust->yadv.corrections = malloc(adjust->yadv.last_pixel_size-adjust->yadv.first_pixel_size+1); + memcpy(adjust->yadv.corrections,vr->adjust->yadv.corrections,adjust->yadv.last_pixel_size-adjust->yadv.first_pixel_size+1); + } ++ free(adjust); + } + + static void PSTInto(SplineChar *sc,PST *pst,PST *frompst, struct lookup_subtable *sub) { +@@ -3898,6 +3899,7 @@ + { + char* str = UndoToString( sc, undo ); + printf("\n\n*** undo: %d\n%s\n", idx, str ); ++ free(str); + } + printf("dumpUndoChain(end) %s\n", msg ); + } +diff -urN fontforge-20170731.old/fontforge/encoding.c fontforge-20170731/fontforge/encoding.c +--- fontforge-20170731.old/fontforge/encoding.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/encoding.c 2018-09-23 14:50:31.560567658 +0530 +@@ -757,6 +757,7 @@ + if ( item->enc_name==NULL ) { + if ( no_windowing_ui ) { + ff_post_error(_("Bad encoding file format"),_("This file contains an unnamed encoding, which cannot be named in a script")); ++ free(head); + return( NULL ); + } + if ( item==head && item->next==NULL ) +diff -urN fontforge-20170731.old/fontforge/featurefile.c fontforge-20170731/fontforge/featurefile.c +--- fontforge-20170731.old/fontforge/featurefile.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/featurefile.c 2018-09-23 14:50:31.561567642 +0530 +@@ -1620,9 +1620,10 @@ + glyphs[lcnt].sc = NULL; + } + +- if ( !needsclasses && lcnt==0 && sf->mark_class_cnt==0 ) ++ if ( !needsclasses && lcnt==0 && sf->mark_class_cnt==0 ){ ++ free(glyphs); + return; /* No anchor positioning, no ligature carets */ +- ++ } + if ( sf->mark_class_cnt!=0 ) { + fprintf( out, "#Mark attachment classes (defined in GDEF, used in lookupflags)\n" ); + for ( i=1; imark_class_cnt; ++i ) { +@@ -1799,9 +1800,12 @@ + } + } + } ++ free(langs); + } + } ++ free(scripts); + } ++ free(feats); + } + if (has_DFLT) { dump_header_languagesystem_hash_fe((gpointer)"DFLT dflt", (gpointer)"", (gpointer)out); } + g_tree_foreach( ht, dump_header_languagesystem_hash_fe, out ); +@@ -3259,15 +3263,18 @@ + LogError(_("Expected '=' in glyph class definition on line %d of %s"), tok->line[tok->inc_depth], tok->filename[tok->inc_depth] ); + ++tok->err_count; + fea_skip_to_semi(tok); ++ free(classname); + return; + } + fea_ParseTok(tok); + contents = fea_ParseGlyphClass(tok); // Make a list of referenced glyphs. + if ( contents==NULL ) { + fea_skip_to_semi(tok); ++ free(contents); + return; + } + fea_AddClassDef(tok,classname,copy(contents)); // Put the list into a class. ++ free(contents); + fea_end_statement(tok); + } + +@@ -3517,6 +3524,7 @@ + LogError(_("Expected name in anchor definition on line %d of %s"), tok->line[tok->inc_depth], tok->filename[tok->inc_depth] ); + ++tok->err_count; + fea_skip_to_semi(tok); ++ free(ap); + return; + } + for ( nap=tok->namedAnchors; nap!=NULL; nap=nap->next ) +@@ -3681,6 +3689,7 @@ + LogError(_("Expected class name in mark class definition on line %d of %s"), tok->line[tok->inc_depth], tok->filename[tok->inc_depth] ); + ++tok->err_count; + fea_skip_to_semi(tok); ++ free(ap); + return; + } + gm = chunkalloc(sizeof(*gm)); +@@ -4639,7 +4648,7 @@ + } + r->lookup_cnt = lc; + } +- ++ free(bcovers); + return( fpst ); + } + +@@ -7092,6 +7101,7 @@ + } + if ( f!=NULL && f->type == ft_feat_end ) + f = f->next; ++ free(sl); + return( f ); + } + +diff -urN fontforge-20170731.old/fontforge/glyphcomp.c fontforge-20170731/fontforge/glyphcomp.c +--- fontforge-20170731.old/fontforge/glyphcomp.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/glyphcomp.c 2018-09-23 14:50:31.562567627 +0530 +@@ -1414,7 +1414,10 @@ + + static void NameCompare(struct font_diff *fd,const char *name1, const char *name2, char *id) { + +- if (!name1) name1=""; if (!name2) name2=""; ++ if (!name1) ++ name1=""; ++ if (!name2) ++ name2=""; + if ( strcmp(name1,name2)!=0 ) { + if ( !fd->top_diff ) + fprintf( fd->diffs, "Names\n" ); +@@ -1442,7 +1445,10 @@ + int lang,int strid) { + char strnamebuf[200]; + +- if (!name1) name1=""; if (!name2) name2=""; ++ if (!name1) ++ name1=""; ++ if (!name2) ++ name2=""; + if ( strcmp(name1,name2)==0 ) + return; + sprintf( strnamebuf, "%.90s %.90s", TTFNameIds(strid), MSLangString(lang)); +diff -urN fontforge-20170731.old/fontforge/http.c fontforge-20170731/fontforge/http.c +--- fontforge-20170731.old/fontforge/http.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/http.c 2018-09-23 14:50:31.562567627 +0530 +@@ -540,7 +540,9 @@ + if ( !findFTPhost(&addr, host, port)) { + ff_progress_end_indicator(); + ff_post_error(_("Could not find host"),_("Could not find \"%s\"\nAre you connected to the internet?"), host ); +- free( host ); free( filename ); ++ free( host ); ++ free( filename ); ++ free(password); + return( false ); + } + soc = makeConnection(&addr); +diff -urN fontforge-20170731.old/fontforge/lookups.c fontforge-20170731/fontforge/lookups.c +--- fontforge-20170731.old/fontforge/lookups.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/lookups.c 2018-09-23 14:50:31.562567627 +0530 +@@ -4746,20 +4746,26 @@ + break; + start = lpt; + if ( *start=='|' ) { +- if ( fpst->type==pst_contextpos || fpst->type==pst_contextsub ) +-return( xasprintf( _("Separation marks only meaningful in contextual chaining lookups, starting at: %.20s..."), lpt )); ++ if ( fpst->type==pst_contextpos || fpst->type==pst_contextsub ){ ++ free(parsed); ++ return( xasprintf( _("Separation marks only meaningful in contextual chaining lookups, starting at: %.20s..."), lpt )); ++ } + if ( first==-1 ) + first = cnt; + else if ( last==-1 ) + last = cnt-1; +- else +-return( xasprintf( _("Too many separation marks, starting at: %.20s..."), lpt )); ++ else{ ++ free(parsed); ++ return( xasprintf( _("Too many separation marks, starting at: %.20s..."), lpt )); ++ } + ++lpt; + continue; + } else if ( *start=='[' ) { + /* A coverage table */ +- if ( fpst->format!=pst_coverage && fpst->format!=pst_reversecoverage ) +-return( xasprintf( _("A coverage table was found in a glyph or class based contextual lookup, starting at: %.20s..."), lpt )); ++ if ( fpst->format!=pst_coverage && fpst->format!=pst_reversecoverage ){ ++ free(parsed); ++ return( xasprintf( _("A coverage table was found in a glyph or class based contextual lookup, starting at: %.20s..."), lpt )); ++ } + ++start; + for ( lpt = start; *lpt!='\0' && *lpt!=']'; ++lpt ); + if ( *lpt!=']' ) +@@ -4788,9 +4794,10 @@ + } + free(parsed[cnt].replacements); + parsed[cnt].replacements = newr; +- } else +-return( xasprintf( _("There must be as many replacement glyphs as there are match glyphs: %s => %s"), ++ } else{ ++ return( xasprintf( _("There must be as many replacement glyphs as there are match glyphs: %s => %s"), + parsed[cnt].entity, parsed[cnt].replacements)); ++ } + continue; + } + } else if ( *start!='@' && *start!='<' && !(*start=='=' && start[1]=='>') ) { +@@ -4802,14 +4809,18 @@ + /* A reverse contextual chaining */ + if ( fpst->format!=pst_reversecoverage ) + return( xasprintf( _("No replacement lists may be specified in this contextual lookup, use a nested lookup instead, starting at: %.20s..."), lpt )); +- if ( do_replacements ) +-return( xasprintf( _("Only one replacement list may be specified in a reverse contextual chaining lookup, starting at: %.20s..."), lpt )); ++ if ( do_replacements ) { ++ free(parsed); ++ return( xasprintf( _("Only one replacement list may be specified in a reverse contextual chaining lookup, starting at: %.20s..."), lpt )); ++ } + do_replacements = true; + lpt += 2; + } else { + /* A lookup invocation */ +- if ( fpst->format==pst_reversecoverage ) +-return( xasprintf( _("No lookups may be specified in a reverse contextual lookup (use a replacement list instead), starting at: %.20s..."), lpt )); ++ if ( fpst->format==pst_reversecoverage ){ ++ free(parsed); ++ return( xasprintf( _("No lookups may be specified in a reverse contextual lookup (use a replacement list instead), starting at: %.20s..."), lpt )); ++ } + + if ( *start=='@' ) { + for ( lpt=start+1; isspace( *lpt ); ++lpt ); +@@ -4867,8 +4878,10 @@ + ret = NULL; + + if ( !do_replacements && !anylookup ) { +- if ( fpst->format==pst_reversecoverage ) +-return( copy( _("A reverse contextual chaining lookup must have a set of replacement glyphs somewhere" )) ); ++ if ( fpst->format==pst_reversecoverage ) { ++ free(parsed); ++ return( copy( _("A reverse contextual chaining lookup must have a set of replacement glyphs somewhere" )) ); ++ } + else { + *return_is_warning = true; + /* If there are no lookups then this rule matches and does nothing */ +@@ -4884,8 +4897,10 @@ + if ( first==-1 ) first = i; + } + if ( parsed[i].replacements!=NULL ) { +- if (( first!=-1 && first!=i ) || (last!=-1 && last!=i )) +-return( copy( _("A reverse contextual chaining lookup can only match one coverage table directly" )) ); ++ if (( first!=-1 && first!=i ) || (last!=-1 && last!=i )){ ++ free(parsed); ++ return( copy( _("A reverse contextual chaining lookup can only match one coverage table directly" )) ); ++ } + first = last = i; + } + } +@@ -4977,11 +4992,13 @@ + free( rule->u.class.fclasses ); rule->u.class.fclasses = NULL; + rule->u.class.bcnt = rule->u.class.fcnt = rule->u.class.ncnt = 0; + if ( iu.class.bclasses[first-1-i] = j; /* Reverse the backtrack classes */ +diff -urN fontforge-20170731.old/fontforge/macbinary.c fontforge-20170731/fontforge/macbinary.c +--- fontforge-20170731.old/fontforge/macbinary.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/macbinary.c 2018-09-23 14:50:31.563567611 +0530 +@@ -299,7 +299,8 @@ + for (;;) { + if ( getc(pfbfile)!=0x80 ) { + IError("We made a pfb file, but didn't get one. Hunh?" ); +-return( NULL ); ++ free(resstarts); ++ return( NULL ); + } + type = getc(pfbfile); + if ( type==3 ) { +@@ -1833,8 +1834,12 @@ + strcpy(pt-1,".fam.bin"); + #endif + } +- if ( WriteMacPSFont(tempname,sfi->sf,format,flags,sfi->map,layer)==0 ) +-return( 0 ); ++ if ( WriteMacPSFont(tempname,sfi->sf,format,flags,sfi->map,layer)==0 ){ ++ free(filename); ++ free(tempname); ++ return( 0 ); ++ } ++ + free(tempname); + } + } else if ( format!=ff_none || bf==bf_sfnt_dfont ) { +@@ -1861,7 +1866,8 @@ + if ( res==NULL ) { + for ( sfsub=sfs; sfsub!=NULL; sfsub=sfsub->next ) + fclose( sfsub->tempttf ); +-return( 0 ); ++ free(filename); ++ return( 0 ); + } + + if ( format==ff_ttfdfont || format==ff_otfdfont || format==ff_otfciddfont || +@@ -1982,8 +1988,9 @@ + if ( pfb==NULL ) { + LogError( _("Can't open temporary file for postscript output\n") ); + fseek(f,here,SEEK_SET ); ++ free(rsrcids); + free(offsets); +-return(NULL); ++ return(NULL); + } + + putc(0x80,pfb); +@@ -2578,7 +2585,9 @@ + char *pt, *lparen; + char *find = NULL; + +- if ((pt = strrchr(filename,'/'))!=NULL ) pt = filename; ++ if ((pt = strrchr(filename,'/'))!=NULL ) ++ pt = filename; ++ + if ( (lparen = strchr(filename,'('))!=NULL && strchr(lparen,')')!=NULL ) { + find = copy(lparen+1); + pt = strchr(find,')'); +@@ -2588,6 +2597,8 @@ + if ( test->psnames[i]!=NULL && strcmp(find,test->psnames[i])==0 ) { + *style = (i&3) | ((i&~3)<<1); /* PS styles skip underline bit */ + *name = copy(test->psnames[i]); ++ free(find); ++ free(pt); + return( test ); + } + } +@@ -2670,8 +2681,10 @@ + SplineChar *sc; + + fond = PickFOND(fondlist,filename,&name,&style); +- if ( fond==NULL ) +-return( NULL ); ++ if ( fond==NULL ){ ++ free(name); ++ return( NULL ); ++ } + + find_id=-1; + if ( flags&ttf_onlyonestrike ) { +@@ -2747,8 +2760,11 @@ + SplineChar *sc1, *sc2; + + fond = PickFOND(fondlist,filename,&name,&style); +- if ( fond==NULL || into==NULL ) +-return( NULL ); ++ if ( fond==NULL || into==NULL ){ ++ free(name); ++ return( NULL ); ++ } ++ + for ( i=0; istylekerncnt; ++i ) + if ( fond->stylekerns[i].style==style ) + break; +@@ -2780,6 +2796,7 @@ + } + kp->off = offset; + } ++ free(name); + return( into ); + } + +@@ -2795,7 +2812,11 @@ + char **ret; + char *temp = TTFGetFontName(binary,pos,pos); + if ( temp==NULL ) +-return( NULL ); ++ { ++ free(temp); ++ free(buffer); ++ return( NULL ); ++ } + ret = malloc(2*sizeof(char *)); + ret[0] = temp; + ret[1] = NULL; +diff -urN fontforge-20170731.old/fontforge/palmfonts.c fontforge-20170731/fontforge/palmfonts.c +--- fontforge-20170731.old/fontforge/palmfonts.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/palmfonts.c 2018-09-23 14:50:31.563567611 +0530 +@@ -178,6 +178,7 @@ + BCCompressBitmap(bdfc); + } + } ++ free(fontImage); + } + + static SplineFont *PalmTestFont(FILE *file,int end, char *family,const char *style) { +@@ -440,6 +441,7 @@ + putlong(file,0); + putlong(file,0); + } ++ free(pt1); + return(file); + } + +diff -urN fontforge-20170731.old/fontforge/parsepdf.c fontforge-20170731/fontforge/parsepdf.c +--- fontforge-20170731.old/fontforge/parsepdf.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/parsepdf.c 2018-09-23 14:50:31.564567596 +0530 +@@ -974,8 +974,11 @@ + while ( prev_xref!=-1 ) { + if ( fseek(pdf,prev_xref,SEEK_SET)!=0 ) return( NULL ); + pdf_skipobjectheader(pc); +- if ( !pdf_readdict(pc)) +-return( NULL ); ++ if ( !pdf_readdict(pc)){ ++ free(gen); ++ free(ret); ++ return( NULL ); ++ } + if ( (pt=PSDictHasEntry(&pc->pdfdict,"Type"))==NULL || strcmp(pt,"/XRef")!=0 ) + return( NULL ); + if ( (pt=PSDictHasEntry(&pc->pdfdict,"Size"))==NULL ) +@@ -2069,6 +2072,7 @@ + pcFree(&pc); + fclose(pc.pdf); + switch_to_old_locale(&tmplocale, &oldlocale); // Switch to the cached locale. ++ free(list); + return( NULL ); + } + +diff -urN fontforge-20170731.old/fontforge/parsettfatt.c fontforge-20170731/fontforge/parsettfatt.c +--- fontforge-20170731.old/fontforge/parsettfatt.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/parsettfatt.c 2018-09-23 14:50:31.564567596 +0530 +@@ -790,6 +790,7 @@ + if ( feof(ttf) ) { + LogError( _("Bad mark table.\n") ); + info->bad_ot = true; ++ free(classes); + return( NULL ); + } + +@@ -1386,6 +1387,7 @@ + if ( glyphs==NULL ) { + /* GT: This continues a multi-line error message, hence the leading space */ + LogError( _(" Bad contextual substitution table, ignored\n") ); ++ free(class); + free(rules); + return; + } +@@ -1543,6 +1545,7 @@ + if ( glyphs==NULL ) { + /* GT: This continues a multi-line error message, hence the leading space */ + LogError( _(" Bad contextual chaining substitution table, ignored\n") ); ++ free(class); + free(rules); + return; + } +@@ -2443,6 +2446,7 @@ + if ( pos+scripts[i].languages[j].offset>=info->g_bounds ) { + LogError(_("Attempt to read script data beyond end of %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(scripts); + return( NULL ); + } + fseek(ttf,pos+scripts[i].languages[j].offset,SEEK_SET); +@@ -2452,6 +2456,7 @@ + if ( feof(ttf)) { + LogError(_("End of file when reading scripts in %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(scripts); + return( NULL ); + } + scripts[i].languages[j].features = malloc(scripts[i].languages[j].fcnt*sizeof(uint16)); +@@ -2463,6 +2468,7 @@ + if ( feof(ttf)) { + LogError(_("End of file in %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(scripts); + return( NULL ); + } + +@@ -2502,6 +2508,7 @@ + if ( pos+features[i].offset>=info->g_bounds ) { + LogError(_("Attempt to read feature data beyond end of %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(features); + return( NULL ); + } + fseek(ttf,pos+features[i].offset,SEEK_SET); +@@ -2518,6 +2525,7 @@ + if ( feof(ttf) ) { + LogError(_("End of file when reading features in %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(features); + return( NULL ); + } + features[i].lookups = malloc(features[i].lcnt*sizeof(uint16)); +@@ -2560,6 +2568,7 @@ + LogError(_("Attempt to read lookup data beyond end of %s table"), + isgpos==2? "JSTF" : isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(lookups); + return( NULL ); + } + fseek(ttf,pos+lookups[i].offset,SEEK_SET); +@@ -2585,6 +2594,7 @@ + if ( feof(ttf) ) { + LogError(_("End of file when reading lookups in %s table"), isgpos ? "GPOS" : "GSUB" ); + info->bad_ot = true; ++ free(lookups); + return( NULL ); + } + for ( j=0; jbad_ot = true; + free(soff); ++ free(loff); + return; + } + +diff -urN fontforge-20170731.old/fontforge/parsettfbmf.c fontforge-20170731/fontforge/parsettfbmf.c +--- fontforge-20170731.old/fontforge/parsettfbmf.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/parsettfbmf.c 2018-09-23 14:50:31.565567580 +0530 +@@ -91,8 +91,8 @@ + /* Only use the provided metrics if it hasn't already been set */ + if (metrics == NULL) + metrics = &big; +- if ( imageformat==8 ) +- /* pad = */ getc(ttf); ++ if ( imageformat==8 ) ++ /* pad = */ getc(ttf); + } else if ( imageformat==6 || imageformat==7 || imageformat==9 ) { + big.height = getc(ttf); + big.width = getc(ttf); +diff -urN fontforge-20170731.old/fontforge/parsettf.c fontforge-20170731/fontforge/parsettf.c +--- fontforge-20170731.old/fontforge/parsettf.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/parsettf.c 2018-09-23 14:50:31.566567564 +0530 +@@ -1972,7 +1972,8 @@ + info->bad_glyph_data = true; + LogError( _("Bad tt font: contour ends make no sense in glyph %d.\n"), + sc->orig_pos ); +-return; ++ free(endpt); ++ return; + } + } + if ( path_cnt==0 ) { +diff -urN fontforge-20170731.old/fontforge/parsettfvar.c fontforge-20170731/fontforge/parsettfvar.c +--- fontforge-20170731.old/fontforge/parsettfvar.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/parsettfvar.c 2018-09-23 14:50:31.567567549 +0530 +@@ -747,6 +747,7 @@ + ti = -1; + if ( k!=info->variations->tuple_count ) + ti = k; ++ free(coords); + } + if ( ti!=-1 ) { + here = ftell(ttf); +diff -urN fontforge-20170731.old/fontforge/plugins.c fontforge-20170731/fontforge/plugins.c +--- fontforge-20170731.old/fontforge/plugins.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/plugins.c 2018-09-23 14:50:31.567567549 +0530 +@@ -35,6 +35,7 @@ + int LoadPlugin(const char *dynamic_lib_name) { + lt_dlhandle plugin; + plugin = load_plugin(dynamic_lib_name, LogError); ++ free(plugin); + return (plugin != NULL); + } + +diff -urN fontforge-20170731.old/fontforge/print.c fontforge-20170731/fontforge/print.c +--- fontforge-20170731.old/fontforge/print.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/print.c 2018-09-23 14:50:31.568567533 +0530 +@@ -2894,6 +2894,7 @@ + } + if ( pt>start && itop = io->prev; + if ( io->isstopped ) + wrapper->endedstopped = true; +- if (io->start != NULL) free(io->start); io->start = NULL; ++ if (io->start != NULL) ++ free(io->start); ++ io->start = NULL; + free(io); + io = wrapper->top; + } +@@ -353,7 +355,9 @@ + while ( io->prev!=NULL && !io->isstopped ) { + iop = io->prev; + wasloop = io->isloop; +- if (io->start != NULL) free(io->start); io->start = NULL; ++ if (io->start != NULL) ++ free(io->start); ++ io->start = NULL; + free(io); + if ( wasloop ) { + wrapper->top = iop; +@@ -377,7 +381,9 @@ + while ( io->prev!=NULL ) { + iop = io->prev; + wasstopped = io->isstopped; +- if (io->start != NULL) free(io->start); io->start = NULL; ++ if (io->start != NULL) ++ free(io->start); ++ io->start = NULL; + free(io); + if ( wasstopped ) { + wrapper->top = iop; +@@ -2292,8 +2298,14 @@ + int mx, mn; + real h, s, b; + mx = mn = r; +- if ( mx>g ) mn=g; else mx=g; +- if ( mxbl ) mn = bl; ++ if ( mx>g ) ++ mn=g; ++ else ++ mx=g; ++ if ( mxbl ) ++ mn = bl; + b = mx/255.; + s = h = 0; + if ( mx>0 ) +@@ -3364,8 +3376,10 @@ + encname = copy(tokbuf); + tok = nextpstoken(&wrapper,&dval,tokbuf,sizeof(tokbuf)); + } +- if ( tok!=pt_openarray && tok!=pt_opencurly ) ++ if ( tok!=pt_openarray && tok!=pt_opencurly ){ ++ free(encname); + return( head ); ++ } + for ( i=0; iwidthset = true; ++ free(pending_hm); ++ free(pt); + return( ret ); + } +diff -urN fontforge-20170731.old/fontforge/python.c fontforge-20170731/fontforge/python.c +--- fontforge-20170731.old/fontforge/python.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/python.c 2018-09-23 14:50:31.572567471 +0530 +@@ -1183,6 +1183,7 @@ + tuple = PyTuple_New(cnt); + for ( i=0; ispiros = SplineSet2SpiroCP(ss,&cnt); + self->spiro_cnt = cnt; ++ free(ss); + } + spirotuple = PyTuple_New(self->spiro_cnt-1); + for ( i=0; ispiro_cnt-1; ++i ) { +@@ -2893,7 +2897,10 @@ + for ( i=0; i=5 ) + smpl.linelenmax = PyFloat_AsDouble( PySequence_GetItem(args,4)); +- if ( PyErr_Occurred() ) ++ if ( PyErr_Occurred() ){ ++ free(ss); + return( NULL ); ++ } + SplinePointListSimplify(NULL,ss,&smpl); + if ( ss==NULL ) { + for ( i=0; ipt_cnt; ++i ) +@@ -3292,6 +3301,7 @@ + do_pycall(pen,"qCurveTo",tuple); + } else { + PyErr_Format(PyExc_TypeError, "Wrong number of off-curve points on a cubic contour"); ++ free(points); + return( NULL ); + } + if ( PyErr_Occurred()) +@@ -3324,6 +3334,7 @@ + if ( PyErr_Occurred()) + return( NULL ); + ++free(points); + Py_RETURN( self ); + } + +@@ -3612,6 +3623,7 @@ + ss2 = SSFromLayer((PyFF_Layer *) other); + } else { + PyErr_Format(PyExc_TypeError, "Unexpected type"); ++ free(ss); + return( -1 ); + } + ret = SSsCompare(ss,ss2,pt_err,spline_err,&badpoint); +@@ -3880,8 +3892,10 @@ + smpl.linefixup = PyFloat_AsDouble( PySequence_GetItem(args,3)); + if ( !PyErr_Occurred() && PySequence_Size(args)>=5 ) + smpl.linelenmax = PyFloat_AsDouble( PySequence_GetItem(args,4)); +- if ( PyErr_Occurred() ) ++ if ( PyErr_Occurred() ){ ++ free(ss); + return( NULL ); ++ } + ss = SplineCharSimplify(NULL,ss,&smpl); + LayerFromSS(ss,self); + SplinePointListsFree(ss); +@@ -4187,8 +4201,10 @@ + SplinePointListsFree(ss); + ss = temp; + } +- if ( !PolyCheck(ss)) ++ if ( !PolyCheck(ss)){ ++ free(ss); + return( -1 ); ++ } + si->poly = ss; + } else if ( width<=0 || minor<=0 ) { + PyErr_Format(PyExc_ValueError, "Stroke width must be positive" ); +@@ -4765,7 +4781,9 @@ + ++nexti; + if ( c->points[nexti]->on_curve ) { + PyErr_Format(PyExc_TypeError, "In cubic splines there must be exactly 2 control points between on curve points"); +-return( NULL ); ++ free(ss); ++ free(sp); ++ return( NULL ); + } + if ( nexti==c->pt_cnt-1 ) + nexti = 0; +@@ -4773,7 +4791,9 @@ + ++nexti; + if ( !c->points[nexti]->on_curve ) { + PyErr_Format(PyExc_TypeError, "In cubic splines there must be exactly 2 control points between on curve points"); +-return( NULL ); ++ free(sp); ++ free(ss); ++ return( NULL ); + } + } + if ( ss->last==NULL ) { +@@ -4785,6 +4805,7 @@ + } + if ( ss->last==NULL ) { + PyErr_Format(PyExc_TypeError, "Empty contour"); ++ free(ss); + return( NULL ); + } + } +@@ -6064,8 +6085,10 @@ + PyErr_Format(PyExc_TypeError, "Unexpected type"); + return( -1 ); + } +- if ( self->sc->layers[self->layer].refs!=NULL ) ++ if ( self->sc->layers[self->layer].refs!=NULL ){ ++ free(ss2); + return( SS_NoMatch | SS_RefMismatch ); ++ } + ret = SSsCompare(self->sc->layers[self->layer].splines,ss2,pt_err,spline_err,&badpoint); + SplinePointListsFree(ss2); + return(ret); +@@ -6274,8 +6297,10 @@ + uni = 0; vs = -1; fid = 0; + if ( PyInt_Check(obj)) + uni = PyInt_AsLong(obj); +- else if ( !PyArg_ParseTuple(obj,"i|ii", &uni, &vs, &fid)) ++ else if ( !PyArg_ParseTuple(obj,"i|ii", &uni, &vs, &fid)){ ++ free(head); + return( -1 ); ++ } + cur = chunkalloc(sizeof(struct altuni)); + if ( vs==0 ) vs=-1; /* convention used in charinfo */ + cur->unienc = uni; cur->vs = vs; cur->fid = fid; +@@ -6738,7 +6763,10 @@ + return( -1 ); + for ( i=0; ighost = true; +@@ -7036,8 +7064,10 @@ + + for ( i=0; isc->vert_variants = chunkalloc(sizeof(struct glyphvariants)); + self->sc->vert_variants->variants = copy(str); + } ++ free(str); + return( 0 ); + } + +@@ -7276,6 +7307,7 @@ + self->sc->horiz_variants = chunkalloc(sizeof(struct glyphvariants)); + self->sc->horiz_variants->variants = copy(str); + } ++ free(str); + return( 0 ); + } + +@@ -7761,6 +7793,7 @@ + + SCCharChangedUpdate(sc,((PyFF_Glyph *) self)->layer); + ++ free(ap); + Py_RETURN( self ); + } + +@@ -8137,6 +8170,7 @@ + } + if ( deltalen==0 ) { + PyErr_Format(PyExc_TypeError,"Glyph name strings may not be empty"); ++ free(str); + return( NULL ); + } + len += deltalen+1; +@@ -8575,6 +8609,7 @@ + old = NULL; + } else { + PyErr_Format(PyExc_KeyError, "Unexpected lookup type: %s",sub->lookup->lookup_name); ++ free(other); + return( NULL ); + } + temp.u.subs.variant = other; +@@ -13659,6 +13694,7 @@ + ext = locfilename+len-2; + if ( ext[0]!='p' || ext[1]!='k' ) { + PyErr_Format(PyExc_EnvironmentError, "No extension for bitmap font"); ++ free(ext); + return( NULL ); + } + } +@@ -13673,7 +13709,8 @@ + back = true; + } else { + PyErr_Format(PyExc_EnvironmentError, "Bad extension for bitmap font"); +-return( NULL ); ++ free(ext); ++ return( NULL ); + } + if ( to_background!=-1 ) + back = to_background; +@@ -13732,8 +13769,10 @@ + free(locfilename); + return( NULL ); + } +- if ( CheckIfFontClosed(other) ) ++ if ( CheckIfFontClosed(other) ){ ++ free(locfilename); + return (NULL); ++ } + flags = FlagsFromTuple(flagstuple,compflags,"comparison flag"); + if ( flags==FLAG_UNKNOWN ) { + free(locfilename); +@@ -14316,6 +14355,8 @@ + if ( offsets!=NULL ) { + if ( cnt1*cnt2 != PySequence_Size(offsets) ) { + PyErr_Format(PyExc_ValueError, "There aren't enough kerning offsets for the number of kerning classes. Should be %d", cnt1*cnt2 ); ++ free(class1_strs); ++ free(class2_strs); + return( NULL ); + } + offs = malloc(cnt1*cnt2*sizeof(int16)); +@@ -14323,7 +14364,9 @@ + offs[i] = PyInt_AsLong(PySequence_GetItem(offsets,i)); + if ( PyErr_Occurred()) { + free(offs); +-return( NULL ); ++ free(class1_strs); ++ free(class2_strs); ++ return( NULL ); + } + } + } else +@@ -14333,6 +14376,8 @@ + sub = addLookupSubtable(sf, lookup, subtable, after_str); + if ( sub==NULL ) { + free(offs); ++ free(class1_strs); ++ free(class2_strs); + return( NULL ); + } + if ( sub->lookup->lookup_type!=gpos_pair ) { +@@ -14407,6 +14452,8 @@ + cnt2 = ParseClassNames(class2s,&class2_strs); + if ( cnt1*cnt2 != PySequence_Size(offsets) ) { + PyErr_Format(PyExc_ValueError, "There aren't enough kerning offsets for the number of kerning classes. Should be %d", cnt1*cnt2 ); ++ free(class1_strs); ++ free(class2_strs); + return( NULL ); + } + offs = malloc(cnt1*cnt2*sizeof(int16)); +@@ -15266,6 +15313,7 @@ + mcnt = ParseClassNames(mclasses,&matchclasses); + if ( mcnt==-1 ) { + PyErr_Format(PyExc_TypeError, "Bad match class" ); ++ free(matchclasses); + return( NULL ); + } + if ( mclassnames!=NULL ) { +@@ -15305,6 +15353,7 @@ + new_subtable = addLookupSubtable(sf, lookup, subtable, after_str); + if ( new_subtable==NULL ) { + free(backclassnames); free(matchclasses); free(forclasses); ++ free(matchclassnames); + return( NULL ); + } + fpst = chunkalloc(sizeof(FPST)); +@@ -15495,6 +15544,7 @@ + rpl_ss = SSFromContour((PyFF_Contour *) rpl, NULL); + } else { + PyErr_Format(PyExc_TypeError, "Expected a contour or layer"); ++ free(srch_ss); + return( NULL ); + } + +@@ -15939,11 +15989,13 @@ + last = cur; + } else { + PyErr_Format(PyExc_TypeError, "Second argument must be either a font or a list of fonts"); ++ free(head); + return( NULL ); + } + } + } else { + PyErr_Format(PyExc_TypeError, "Second argument must be either a font or a list of fonts"); ++ free(head); + return( NULL ); + } + +@@ -15982,6 +16034,7 @@ + otl = SFFindLookup(fv->sf,lookup_name); + if ( otl == NULL ) { + PyErr_Format(PyExc_EnvironmentError, "No lookup named %s", lookup_name ); ++ free(locfilename); + return( NULL ); + } + } +@@ -16080,6 +16133,7 @@ + if ( sf->fv==NULL ) + EncMapFree(sf->map); + newfv = SFAdd(InterpolateFont(fv->sf,sf,fraction, fv->map->enc ),false); ++ free(sf); + return( PyFV_From_FV_I(newfv)); + } + +diff -urN fontforge-20170731.old/fontforge/savefont.c fontforge-20170731/fontforge/savefont.c +--- fontforge-20170731.old/fontforge/savefont.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/savefont.c 2018-09-23 14:50:31.573567455 +0530 +@@ -313,8 +313,10 @@ + char *buf = malloc(strlen(filename)+12), *pt; + FILE *flog; + +- if ( sf->fontlog==NULL || *sf->fontlog=='\0' ) +-return( true ); ++ if ( sf->fontlog==NULL || *sf->fontlog=='\0' ) { ++ free(buf); ++ return( true ); ++ } + + strcpy(buf,filename); + pt = strrchr(buf,'/'); +diff -urN fontforge-20170731.old/fontforge/scstyles.c fontforge-20170731/fontforge/scstyles.c +--- fontforge-20170731.old/fontforge/scstyles.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/scstyles.c 2018-09-23 14:50:31.575567424 +0530 +@@ -2578,7 +2578,8 @@ + for ( j=0; jpointcnt!=s->rpointcnt ) +- MinimumDistancesFree(sc->md); sc->md = NULL; ++ MinimumDistancesFree(sc->md); ++ sc->md = NULL; + + sc_p = s->matched_sp; p_p = path->first, r_p = rpath->first; + if ( s->endpoints ) { +diff -urN fontforge-20170731.old/fontforge/sfd.c fontforge-20170731/fontforge/sfd.c +--- fontforge-20170731.old/fontforge/sfd.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/sfd.c 2018-09-23 14:50:31.576567408 +0530 +@@ -7924,10 +7924,14 @@ + { + char* sname = SFDReadUTF7Str(sfd); + if (sf->pfminfo.stylemap == -1) { +- if (strcmp(sname,"bold italic")==0) sf->pfminfo.stylemap = 0x21; +- else if (strcmp(sname,"bold")==0) sf->pfminfo.stylemap = 0x20; +- else if (strcmp(sname,"italic")==0) sf->pfminfo.stylemap = 0x01; +- else if (strcmp(sname,"regular")==0) sf->pfminfo.stylemap = 0x40; ++ if (strcmp(sname,"bold italic")==0) ++ sf->pfminfo.stylemap = 0x21; ++ else if (strcmp(sname,"bold")==0) ++ sf->pfminfo.stylemap = 0x20; ++ else if (strcmp(sname,"italic")==0) ++ sf->pfminfo.stylemap = 0x01; ++ else if (strcmp(sname,"regular")==0) ++ sf->pfminfo.stylemap = 0x40; + } + free(sname); + } +@@ -8010,7 +8014,8 @@ + { + /* Class 0 is unused */ + int temp; +- while ( (temp=nlgetc(sfd))=='\n' || temp=='\r' ); ungetc(temp,sfd); ++ while ( (temp=nlgetc(sfd))=='\n' || temp=='\r' ); ++ ungetc(temp,sfd); + sf->mark_class_names[i] = SFDReadUTF7Str(sfd); + getint(sfd,&temp); + sf->mark_classes[i] = malloc(temp+1); sf->mark_classes[i][temp] = '\0'; +@@ -8027,10 +8032,12 @@ + { + /* Set 0 is used */ + int temp; +- while ( (temp=nlgetc(sfd))=='\n' || temp=='\r' ); ungetc(temp,sfd); ++ while ( (temp=nlgetc(sfd))=='\n' || temp=='\r' ); ++ ungetc(temp,sfd); + sf->mark_set_names[i] = SFDReadUTF7Str(sfd); + getint(sfd,&temp); +- sf->mark_sets[i] = malloc(temp+1); sf->mark_sets[i][temp] = '\0'; ++ sf->mark_sets[i] = malloc(temp+1); ++ sf->mark_sets[i][temp] = '\0'; + nlgetc(sfd); /* skip space */ + fread(sf->mark_sets[i],1,temp,sfd); + } +@@ -8042,7 +8049,8 @@ + int kernclassversion = 0; + int isv = tok[0]=='V'; + int kcvoffset = (isv ? 10 : 9); //Offset to read kerning class version +- if (isdigit(tok[kcvoffset])) kernclassversion = tok[kcvoffset] - '0'; ++ if (isdigit(tok[kcvoffset])) ++ kernclassversion = tok[kcvoffset] - '0'; + int temp, classstart=1; + int old = (kernclassversion == 0); + +@@ -8088,35 +8096,51 @@ + for ( i=classstart; ifirst_cnt; ++i ) { + if (kernclassversion < 3) { + getint(sfd,&temp); +- kc->firsts[i] = malloc(temp+1); kc->firsts[i][temp] = '\0'; ++ kc->firsts[i] = malloc(temp+1); ++ kc->firsts[i][temp] = '\0'; + nlgetc(sfd); /* skip space */ + fread(kc->firsts[i],1,temp,sfd); + } else { + getint(sfd,&kc->firsts_flags[i]); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); if (ch == '\n' || ch == EOF) continue; ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); ++ if (ch == '\n' || ch == EOF) ++ continue; + kc->firsts_names[i] = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); if (ch == '\n' || ch == EOF) continue; ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); ++ if (ch == '\n' || ch == EOF) ++ continue; + kc->firsts[i] = SFDReadUTF7Str(sfd); + if (kc->firsts[i] == NULL) kc->firsts[i] = copy(""); // In certain places, this must be defined. +- while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ++ ungetc(ch, sfd); + } + } + kc->seconds[0] = NULL; + for ( i=1; isecond_cnt; ++i ) { + if (kernclassversion < 3) { + getint(sfd,&temp); +- kc->seconds[i] = malloc(temp+1); kc->seconds[i][temp] = '\0'; ++ kc->seconds[i] = malloc(temp+1); ++ kc->seconds[i][temp] = '\0'; + nlgetc(sfd); /* skip space */ + fread(kc->seconds[i],1,temp,sfd); + } else { + getint(sfd,&temp); + kc->seconds_flags[i] = temp; +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); if (ch == '\n' || ch == EOF) continue; ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); ++ if (ch == '\n' || ch == EOF) ++ continue; + kc->seconds_names[i] = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); if (ch == '\n' || ch == EOF) continue; ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); ++ if (ch == '\n' || ch == EOF) ++ continue; + kc->seconds[i] = SFDReadUTF7Str(sfd); + if (kc->seconds[i] == NULL) kc->seconds[i] = copy(""); // In certain places, this must be defined. +- while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ++ ungetc(ch, sfd); + } + } + for ( i=0; ifirst_cnt*kc->second_cnt; ++i ) { +@@ -8173,39 +8197,50 @@ + } + else if ( strmatch(tok,"Group:")==0 ) { + struct ff_glyphclasses *grouptmp = calloc(1, sizeof(struct ff_glyphclasses)); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + grouptmp->classname = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + grouptmp->glyphs = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ++ ungetc(ch, sfd); + if (d->lastgroup != NULL) d->lastgroup->next = grouptmp; else sf->groups = grouptmp; + d->lastgroup = grouptmp; + } + else if ( strmatch(tok,"GroupKern:")==0 ) { + int temp = 0; + struct ff_rawoffsets *kerntmp = calloc(1, sizeof(struct ff_rawoffsets)); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + kerntmp->left = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + kerntmp->right = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + getint(sfd,&temp); + kerntmp->offset = temp; +- while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ++ ungetc(ch, sfd); + if (d->lastgroupkern != NULL) d->lastgroupkern->next = kerntmp; else sf->groupkerns = kerntmp; + d->lastgroupkern = kerntmp; + } + else if ( strmatch(tok,"GroupVKern:")==0 ) { + int temp = 0; + struct ff_rawoffsets *kerntmp = calloc(1, sizeof(struct ff_rawoffsets)); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + kerntmp->left = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + kerntmp->right = SFDReadUTF7Str(sfd); +- while ((ch=nlgetc(sfd)) == ' '); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' '); ++ ungetc(ch, sfd); + getint(sfd,&temp); + kerntmp->offset = temp; +- while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ungetc(ch, sfd); ++ while ((ch=nlgetc(sfd)) == ' ' || ch == '\n'); ++ ungetc(ch, sfd); + if (d->lastgroupvkern != NULL) d->lastgroupvkern->next = kerntmp; else sf->groupvkerns = kerntmp; + d->lastgroupvkern = kerntmp; + } +@@ -8267,6 +8302,7 @@ + // + return false; + } ++ free(kc); + return true; + } + +@@ -8710,6 +8746,7 @@ + else if ( lastnamedinstance !=NULL ) + lastnamedinstance->names = names; + pushedbacktok = true; ++ free(names); + } else if ( strmatch(tok,"MMCDV:")==0 ) { + MMSet *mm = sf->mm; + if ( mm!=NULL ) +@@ -8833,6 +8870,7 @@ + if (sf->map == NULL) sf->map = EncMapNew(sf->glyphcnt,sf->glyphcnt,&custom); + + SFDFixupUndoRefs(sf); ++ free(remap); + return( sf ); + } + +diff -urN fontforge-20170731.old/fontforge/sflayout.c fontforge-20170731/fontforge/sflayout.c +--- fontforge-20170731.old/fontforge/sflayout.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/sflayout.c 2018-09-23 14:50:31.576567408 +0530 +@@ -1285,6 +1285,7 @@ + LayoutInfo_Destroy(li); + if ( freeme!=NULL ) + arrayfree(freeme); ++ free(li); + } + + #include +@@ -1415,5 +1416,6 @@ + } + + LI_MetaChangeCleanup(li,start,end,width); ++ free(fl); + return( true ); + } +diff -urN fontforge-20170731.old/fontforge/splinefont.c fontforge-20170731/fontforge/splinefont.c +--- fontforge-20170731.old/fontforge/splinefont.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/splinefont.c 2018-09-23 14:50:31.577567393 +0530 +@@ -999,8 +999,10 @@ + unlink(spuriousname); free(spuriousname); + } else + strippedname = Unarchive(strippedname,&archivedir); +- if ( strippedname==NULL ) +- return NULL; ++ if ( strippedname==NULL ){ ++ free(archivedir); ++ return NULL; ++ } + if ( strippedname!=fname && paren!=NULL ) { + fullname = malloc(strlen(strippedname)+strlen(paren)+1); + strcpy(fullname,strippedname); +@@ -1160,7 +1162,8 @@ + checked = 'i'; + sf = SFReadIkarus(fullname); + } /* Too hard to figure out a valid mark for a mac resource file */ +- if ( file!=NULL ) fclose(file); ++ if ( file!=NULL ) ++ fclose(file); + } + + if ( sf!=NULL ) +@@ -1280,7 +1283,9 @@ + sf = NULL; + } + } +- if (fname != NULL && fname != filename) free(fname); fname = NULL; ++ if (fname != NULL && fname != filename) ++ free(fname); ++ fname = NULL; + return sf; + } + +diff -urN fontforge-20170731.old/fontforge/splineoverlap.c fontforge-20170731/fontforge/splineoverlap.c +--- fontforge-20170731.old/fontforge/splineoverlap.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/splineoverlap.c 2018-09-23 14:50:31.577567393 +0530 +@@ -494,6 +494,7 @@ + } + current_pointer = &((*current_pointer)->next); + } ++ free(tmp_pointer); + return; + } + +diff -urN fontforge-20170731.old/fontforge/splinesaveafm.c fontforge-20170731/fontforge/splinesaveafm.c +--- fontforge-20170731.old/fontforge/splinesaveafm.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/splinesaveafm.c 2018-09-23 14:55:32.054958121 +0530 +@@ -1285,8 +1285,10 @@ + ch = start[4]; start[4] = '\0'; + unicode[u++] = strtol(start,&end,16); + start[4] = ch; +- if ( *end!='\0' ) +-return( -1 ); ++ if ( *end!='\0' ){ ++ free(start); ++ return( -1 ); ++ } + start += 4; + } + return( u ); +@@ -3424,6 +3426,7 @@ + free( italicindex ); + } else + free( lkarray ); ++ free(kerns); + return( !ferror(tfm)); + } + +diff -urN fontforge-20170731.old/fontforge/splinestroke.c fontforge-20170731/fontforge/splinestroke.c +--- fontforge-20170731.old/fontforge/splinestroke.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/splinestroke.c 2018-09-23 14:50:31.578567377 +0530 +@@ -3847,6 +3847,7 @@ + c.resolution = c.radius/3; + if (c.resolution == 0) { + ff_post_notice(_("Invalid stroke parameters"), _("Stroke resolution is zero")); ++ free(first); + return SplinePointListCopy(ss); + } + cur = SplineSets_Stroke(ss,&c,order2); +diff -urN fontforge-20170731.old/fontforge/splineutil.c fontforge-20170731/fontforge/splineutil.c +--- fontforge-20170731.old/fontforge/splineutil.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/splineutil.c 2018-09-23 14:50:31.579567361 +0530 +@@ -224,7 +224,8 @@ + next = spline->to->next; // Cache the location of the next spline. + SplinePointFree(spline->to); // Free the destination point. + SplineFree(spline); // Free the spline. +- if ( first==NULL ) first = spline; // We want to avoid repeating the circuit. ++ if ( first==NULL ) ++ first = spline; // We want to avoid repeating the circuit. + } + // If the path is open or has no splines, free the starting point. + if ( spl->last!=spl->first || nonext ) +@@ -262,7 +263,8 @@ + next = spline->to->next; + SplinePointMDFree(sc,spline->to); + SplineFree(spline); +- if ( first==NULL ) first = spline; ++ if ( first==NULL ) ++ first = spline; + } + if ( freefirst ) + SplinePointMDFree(sc,spl->first); +@@ -1404,7 +1406,8 @@ + last = cur; + i = j; + } +-return( head ); ++ free(list); ++ return( head ); + } + + SplinePointList *SplinePointListCopy(const SplinePointList *base) { +diff -urN fontforge-20170731.old/fontforge/strlist.c fontforge-20170731/fontforge/strlist.c +--- fontforge-20170731.old/fontforge/strlist.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/strlist.c 2018-09-23 14:50:31.579567361 +0530 +@@ -34,6 +34,7 @@ + list->next = NULL; + list->str = str2; + } ++ free(str2); + return list; + } + +diff -urN fontforge-20170731.old/fontforge/svg.c fontforge-20170731/fontforge/svg.c +--- fontforge-20170731.old/fontforge/svg.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/svg.c 2018-09-23 14:50:31.580567346 +0530 +@@ -2634,8 +2634,11 @@ + if ( name!=NULL ) { + int hide = xmlStrcmp(name,(xmlChar *) "none")==0; + xmlFree(name); +- if ( hide ) +-return( NULL ); ++ if ( hide ){ ++ free(fill_colour_source); ++ free(stroke_colour_source); ++ return( NULL ); ++ } + } + name = xmlGetProp(svg,(xmlChar *) "visibility"); + if ( name!=NULL ) { +@@ -2772,7 +2775,9 @@ + + if ( !st.isvisible ) { + SvgStateFree(&st); +-return( NULL ); ++ free(fill_colour_source); ++ free(stroke_colour_source); ++ return( NULL ); + } + + /* basic shapes */ +@@ -2798,8 +2803,11 @@ + return( eret ); + } else + return( NULL ); +- if ( head==NULL ) +-return( NULL ); ++ if ( head==NULL ){ ++ free(fill_colour_source); ++ free(stroke_colour_source); ++ return( NULL ); ++ } + + SPLCategorizePoints(head); + +@@ -3056,6 +3064,7 @@ + } + free(u); + } ++ free(chars); + } + + static char *SVGGetNames(SplineFont *sf,xmlChar *g,xmlChar *utf8,SplineChar **sc) { +diff -urN fontforge-20170731.old/fontforge/tottfaat.c fontforge-20170731/fontforge/tottfaat.c +--- fontforge-20170731.old/fontforge/tottfaat.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/tottfaat.c 2018-09-23 14:50:31.580567346 +0530 +@@ -1483,6 +1483,7 @@ + } + free(scripts); + } ++ free(sm); + return( features ); + } + +diff -urN fontforge-20170731.old/fontforge/tottf.c fontforge-20170731/fontforge/tottf.c +--- fontforge-20170731.old/fontforge/tottf.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/tottf.c 2018-09-23 14:50:31.581567330 +0530 +@@ -4394,8 +4394,10 @@ + (subheadcnt-i)*sizeof(struct subhead) + sizeof(uint16); + + sub = tmpfile(); +- if ( sub==NULL ) +-return( NULL ); ++ if ( sub==NULL ){ ++ free(glyphs); ++ return( NULL ); ++ } + + putshort(sub,2); /* 8/16 format */ + putshort(sub,0); /* Subtable length, we'll come back and fix this */ +diff -urN fontforge-20170731.old/fontforge/tottfgpos.c fontforge-20170731/fontforge/tottfgpos.c +--- fontforge-20170731.old/fontforge/tottfgpos.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/tottfgpos.c 2018-09-23 14:54:53.300546119 +0530 +@@ -452,8 +452,10 @@ + ++cnt; + } + } +- if ( cnt==0 ) +-return( NULL ); ++ if ( cnt==0 ){ ++ free(array); ++ return( NULL ); ++ } + if ( j==1 ) + break; + array = malloc((cnt+1)*sizeof(SplineChar *)); +@@ -583,13 +585,14 @@ + // And we null-terminate. + glyphs[i] = NULL; + } +- for ( i=0; ittf_glyph==glyphs[i+1]->ttf_glyph) { + // fprintf(stderr, "Duplicate glyph.\n"); + memmove(glyphs+i, glyphs+i+1, (cnt-i)*sizeof(SplineChar *)); + --cnt; + } +- glyphs[cnt] = NULL; ++ } ++ glyphs[cnt] = NULL; + return( glyphs ); + } + +@@ -3476,8 +3479,10 @@ + glyphs = malloc((lcnt+1)*sizeof(SplineChar *)); + glyphs[lcnt] = NULL; + } +- if ( !needsclass && lcnt==0 && sf->mark_class_cnt==0 && sf->mark_set_cnt==0 ) +-return; /* No anchor positioning, no ligature carets */ ++ if ( !needsclass && lcnt==0 && sf->mark_class_cnt==0 && sf->mark_set_cnt==0 ){ ++ free(glyphs); ++ return; /* No anchor positioning, no ligature carets */ ++ } + + at->gdef = tmpfile(); + if ( sf->mark_set_cnt==0 ) { +diff -urN fontforge-20170731.old/fontforge/ttfinstrs.c fontforge-20170731/fontforge/ttfinstrs.c +--- fontforge-20170731.old/fontforge/ttfinstrs.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/ttfinstrs.c 2018-09-23 14:50:31.582567314 +0530 +@@ -309,7 +309,8 @@ + val = strtol(pt,&end,0); + if ( val>32767 || val<-32768 ) { + IVError(iv,_("A value must be between [-32768,32767]"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + + pt = end; +@@ -317,14 +318,16 @@ + if ( *pt == '@' ) { /* a delta control byte */ + if ( val>8 || val<-8 || val==0 ) { + IVError(iv,_("A value must be between [-8,-1] or [1,8]"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + + pt++; + + if ( !isdigit( *pt ) ) { + IVError(iv,_("Number expected"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + + temp = val; +@@ -332,7 +335,8 @@ + + if ( val>15 || val<0 ) { + IVError(iv,_("A value must be between [0,15]"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + + val *= 16; +@@ -348,14 +352,16 @@ + while ( *pt==' ' || *pt=='\t' ) ++pt; + if ( *pt!='(' ) { + IVError(iv,_("Missing left parenthesis in command to get a cvt index"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + temp = strtol(pt+1,&end,0); + pt = end; + while ( *pt==' ' || *pt=='\t' ) ++pt; + if ( *pt!=')' ) { + IVError(iv,_("Missing right paren in command to get a cvt index"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + numberstack[npos++] = TTF__getcvtval(sf,temp); + ++pt; +@@ -396,7 +402,8 @@ + } + if ( nread=32 ) { + IVError(iv,_("Bracketted value is too large"),pt-text); +-return( NULL ); ++ free(instrs); ++ return( NULL ); + } + i += val; + } +diff -urN fontforge-20170731.old/fontforge/ttfspecial.c fontforge-20170731/fontforge/ttfspecial.c +--- fontforge-20170731.old/fontforge/ttfspecial.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/ttfspecial.c 2018-09-23 14:54:21.159033774 +0530 +@@ -1356,6 +1356,7 @@ + } + } + free(contours); ++ free(cur); + } + + static void pfed_readguidelines(FILE *ttf,struct ttfinfo *info,uint32 base) { +diff -urN fontforge-20170731.old/fontforge/ufo.c fontforge-20170731/fontforge/ufo.c +--- fontforge-20170731.old/fontforge/ufo.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforge/ufo.c 2018-09-23 14:50:31.583567299 +0530 +@@ -2513,7 +2513,18 @@ + } + lastref = r; + } +- if (xs) free(xs); if (ys) free(ys); if (xys) free(xys); if (yxs) free(yxs); if (xo) free(xo); if (yo) free(yo); ++ if (xs) ++ free(xs); ++ if (ys) ++ free(ys); ++ if (xys) ++ free(xys); ++ if (yxs) ++ free(yxs); ++ if (xo) ++ free(xo); ++ if (yo) ++ free(yo); + } else if ( xmlStrcmp(contour->name,(const xmlChar *) "contour")==0 ) { + xmlNodePtr npoints; + +@@ -4065,12 +4076,12 @@ + strncmp(sf->names->names[ttf_version],"Version ",8)==0 ) + sf->version = copy(sf->names->names[ttf_version]+8); + +- char * layercontentsname = buildname(basedir,"layercontents.plist"); +- char ** layernames = NULL; +- if (layercontentsname == NULL) { ++ char * layercontentsname = buildname(basedir,"layercontents.plist"); ++ char ** layernames = NULL; ++ if (layercontentsname == NULL) { + switch_to_old_locale(&tmplocale, &oldlocale); // Switch to the cached locale. + return( NULL ); +- } else if ( GFileExists(layercontentsname)) { ++ } else if ( GFileExists(layercontentsname)) { + xmlDocPtr layercontentsdoc = NULL; + xmlNodePtr layercontentsplist = NULL; + xmlNodePtr layercontentsdict = NULL; +diff -urN fontforge-20170731.old/fontforgeexe/alignment.c fontforge-20170731/fontforgeexe/alignment.c +--- fontforge-20170731.old/fontforgeexe/alignment.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/alignment.c 2018-09-23 14:50:31.583567299 +0530 +@@ -126,8 +126,10 @@ + } + + /* we need at least three regions to space things out */ +- if ( rcnt<3 ) ++ if ( rcnt<3 ){ ++ free(regions); + return; ++ } + + /* Now should I allow equal spaces between regions, or spaces between */ + /* region mid-points? I think spaces between regions */ +diff -urN fontforge-20170731.old/fontforgeexe/charinfo.c fontforge-20170731/fontforgeexe/charinfo.c +--- fontforge-20170731.old/fontforgeexe/charinfo.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/charinfo.c 2018-09-23 14:50:31.584567283 +0530 +@@ -3008,6 +3008,7 @@ + for ( j=0; ju.mouse = event->u.mouse; +- if ( dx<0 ) dx = -dx; if ( dy<0 ) dy = -dy; ++ if ( dx<0 ) ++ dx = -dx; ++ if ( dy<0 ) ++ dy = -dy; + if ( dy >= 2*dx ) { + cv->p.x = fake->u.mouse.x = basex; + cv->p.cx = basetruex ; +@@ -4726,6 +4729,7 @@ + { + GGadgetSetTitle( cv->charselector, p ); + } ++ free(srctxt); + } + + +@@ -5328,7 +5332,10 @@ + int sign = dx*dy<0?-1:1; + double aspect = 1.0; + +- if ( dx<0 ) dx = -dx; if ( dy<0 ) dy = -dy; ++ if ( dx<0 ) ++ dx = -dx; ++ if ( dy<0 ) ++ dy = -dy; + if ( cv->p.img!=NULL && cv->p.img->bb.minx!=cv->p.img->bb.maxx ) + aspect = (cv->p.img->bb.maxy - cv->p.img->bb.miny) / (cv->p.img->bb.maxx - cv->p.img->bb.minx); + else if ( cv->p.ref!=NULL && cv->p.ref->bb.minx!=cv->p.ref->bb.maxx ) +@@ -7487,8 +7494,10 @@ + e.u.control.subtype = et_textchanged; + e.u.control.u.tf_changed.from_pulldown = 0; + CV_OnCharSelectorTextChanged( cv->charselector, &e ); ++ free(txt); + return; + } ++ free(txt); + } + + if ( mid == MID_Next ) { +@@ -12810,6 +12819,7 @@ + } + } + } ++ free(wll); + } + free(txt); + +diff -urN fontforge-20170731.old/fontforgeexe/contextchain.c fontforge-20170731/fontforgeexe/contextchain.c +--- fontforge-20170731.old/fontforgeexe/contextchain.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/contextchain.c 2018-09-23 14:50:31.586567252 +0530 +@@ -641,6 +641,7 @@ + (&r->u.class.nclasses)[which] = malloc(any*sizeof(uint16)); + } + } ++ free(pt); + return( true ); + } + +diff -urN fontforge-20170731.old/fontforgeexe/cvgetinfo.c fontforge-20170731/fontforgeexe/cvgetinfo.c +--- fontforge-20170731.old/fontforgeexe/cvgetinfo.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/cvgetinfo.c 2018-09-23 14:50:31.586567252 +0530 +@@ -1059,6 +1059,7 @@ + ti = AnchorClassesLList(sf),false); + for ( j=0; ti[j]->text!=NULL && ti[j]->userdata!=ac; ++j ) + GGadgetSelectOneListItem(GWidgetGetControl(ci->gw,CID_NameList),j); ++ free(name); + return( true ); + } + +@@ -3903,8 +3904,11 @@ + } + ++k; + } while ( k<_sf->subfontcnt ); +- if ( tot==0 ) ++ if ( tot==0 ){ ++ free(deps); ++ free(depsc); + return; ++ } + if ( j==0 ) { + deps = calloc(tot+1,sizeof(char *)); + depsc = malloc(tot*sizeof(SplineChar *)); +diff -urN fontforge-20170731.old/fontforgeexe/cvimportdlg.c fontforge-20170731/fontforgeexe/cvimportdlg.c +--- fontforge-20170731.old/fontforgeexe/cvimportdlg.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/cvimportdlg.c 2018-09-23 14:50:31.587567236 +0530 +@@ -427,8 +427,10 @@ + GGadget *tf; + + GFileChooserGetChildren(d->gfc,NULL,NULL,&tf); +- if ( *_GGadgetGetTitle(tf)=='\0' ) ++ if ( *_GGadgetGetTitle(tf)=='\0' ){ ++ free(temp); + return( true ); ++ } + GDrawSetCursor(GGadgetGetWindow(g),ct_watch); + if ( d->fv!=NULL ) + flast_format = pos; +diff -urN fontforge-20170731.old/fontforgeexe/cvpalettes.c fontforge-20170731/fontforgeexe/cvpalettes.c +--- fontforge-20170731.old/fontforgeexe/cvpalettes.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/cvpalettes.c 2018-09-23 14:50:31.587567236 +0530 +@@ -2432,6 +2432,7 @@ + + layerinfo.rename_active = 0; + CVInfoDrawText(cv,cv->gw); ++ free(str); + } + } + +diff -urN fontforge-20170731.old/fontforgeexe/displayfonts.c fontforge-20170731/fontforgeexe/displayfonts.c +--- fontforge-20170731.old/fontforgeexe/displayfonts.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/displayfonts.c 2018-09-23 14:50:31.588567221 +0530 +@@ -138,6 +138,7 @@ + float pw,ph, scale; + if ( sscanf(cret,"%gx%g",&pw,&ph)!=2 ) { + IError("Bad Pagesize must be a known name or x\nWhere is one of pt (points), mm, cm, in" ); ++ free(cret); + return( true ); + } + pt = cret+strlen(cret)-1; +@@ -152,6 +153,7 @@ + scale = 1; + else { + IError("Bad Pagesize units are unknown\nMust be one of pt (points), mm, cm, in" ); ++ free(pt); + return( true ); + } + pgwidth = pw*scale; pgheight = ph*scale; +@@ -1431,6 +1433,7 @@ + feats[cnt] = 0; + /* These will be ordered because the list widget will do that */ + SFTFSetFeatures(GWidgetGetControl(di->gw,CID_SampleText),-1,-1,feats); ++ free(feats); + } + return( true ); + } +diff -urN fontforge-20170731.old/fontforgeexe/fontinfo.c fontforge-20170731/fontforgeexe/fontinfo.c +--- fontforge-20170731.old/fontforgeexe/fontinfo.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/fontinfo.c 2018-09-23 14:50:31.589567205 +0530 +@@ -3752,6 +3752,7 @@ + } + } + } ++ free(changed); + } + + static void StoreTTFNames(struct gfi_data *d) { +diff -urN fontforge-20170731.old/fontforgeexe/fontview.c fontforge-20170731/fontforgeexe/fontview.c +--- fontforge-20170731.old/fontforgeexe/fontview.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/fontview.c 2018-09-23 14:50:31.590567190 +0530 +@@ -582,6 +582,7 @@ + GGadgetSetTitle8(fc,newname); + save_to_dir = *_s2d = s2d; + SavePrefs(true); ++ free(oldname); + } + return( true ); + } +@@ -3741,12 +3742,15 @@ + free(filename); + if ( new==NULL ) + return; +- if ( new->fv == &fv->b ) /* Already part of us */ ++ if ( new->fv == &fv->b ) { /* Already part of us */ ++ free(new); + return; ++ } + if ( new->fv != NULL ) { + if ( ((FontView *) (new->fv))->gw!=NULL ) + GDrawRaise( ((FontView *) (new->fv))->gw); + ff_post_error(_("Please close font"),_("Please close %s before inserting it into a CID font"),new->origname); ++ free(new); + return; + } + EncMapFree(new->map); +@@ -4978,9 +4982,11 @@ + nl = NameListByName(namelists[ret]); + if ( nl==NULL ) { + IError("Couldn't find namelist"); ++ free(namelists); + return; + } else if ( nl!=NULL && nl->uses_unicode && !allow_utf8_glyphnames) { + ff_post_error(_("Namelist contains non-ASCII names"),_("Glyph names should be limited to characters in the ASCII character set, but there are names in this namelist which use characters outside that range.")); ++ free(namelists); + return; + } + SFRenameGlyphsToNamelist(fv->b.sf,nl); +@@ -6699,7 +6705,9 @@ + msg = xasprintf ( "%u 0x%x U+%04X \"%.25s\" %.100s", + localenc, localenc, upos, + (sc->name == NULL) ? "" : sc->name, uniname ); +- if ( uniname != NULL ) free( uniname ); uniname = NULL; ++ if ( uniname != NULL ) ++ free( uniname ); ++ uniname = NULL; + + /* annotation */ + char *uniannot = unicode_annot( upos ); +@@ -8129,6 +8137,7 @@ + free(repr); + *rpt++ = ' '; + } ++ free(repr); + } + } + if ( k==0 ) +diff -urN fontforge-20170731.old/fontforgeexe/fvfontsdlg.c fontforge-20170731/fontforgeexe/fvfontsdlg.c +--- fontforge-20170731.old/fontforgeexe/fvfontsdlg.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/fvfontsdlg.c 2018-09-23 14:50:31.590567190 +0530 +@@ -73,6 +73,7 @@ + file = fpt+2; + } while ( fpt!=NULL ); + free(filename); ++ free(sf); + } + + GTextInfo *BuildFontList(FontView *except) { +@@ -285,6 +286,7 @@ + if ( sf==NULL ) + return; + FontViewCreate(InterpolateFont(fv->b.sf,sf,amount,fv->b.map->enc),false); ++ free(sf); + } + + #define CID_Amount 1000 +diff -urN fontforge-20170731.old/fontforgeexe/histograms.c fontforge-20170731/fontforgeexe/histograms.c +--- fontforge-20170731.old/fontforgeexe/histograms.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/histograms.c 2018-09-23 14:50:31.590567190 +0530 +@@ -573,8 +573,11 @@ + ret2 = GGadgetGetTitle(GWidgetGetControl(hist->gw,CID_SecondaryVal)); + hist->done = true; + if ( (*ret1=='\0' || uc_strcmp(ret1,"[]")==0 ) && +- (*ret2=='\0' || uc_strcmp(ret2,"[]")==0 ) && p==NULL ) ++ (*ret2=='\0' || uc_strcmp(ret2,"[]")==0 ) && p==NULL ){ ++ free(ret1); ++ free(ret2); + return; ++ } + if ( p==NULL ) { + hist->sf->private = p = calloc(1,sizeof(struct psdict)); + p->cnt = 10; +@@ -583,6 +586,8 @@ + } + PSDictChangeEntry(p,primary,temp=cu_copy(ret1)); free(temp); + PSDictChangeEntry(p,secondary,temp=cu_copy(ret2)); free(temp); ++ free(ret1); ++ free(ret2); + } + + static int leftside_e_h(GWindow gw, GEvent *event) { +diff -urN fontforge-20170731.old/fontforgeexe/kernclass.c fontforge-20170731/fontforgeexe/kernclass.c +--- fontforge-20170731.old/fontforgeexe/kernclass.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/kernclass.c 2018-09-23 14:50:31.591567174 +0530 +@@ -1345,6 +1345,7 @@ + KCD_VShow(kcd,i); + else + KCD_HShow(kcd,i); ++ free(name); + return( true ); + } + if ( *pt=='(' ) { +@@ -1358,7 +1359,9 @@ + /* Otherwise deselect everything */ + if ( nlen!=0 ) + GMatrixEditActivateRowCol(list,-1,-1); ++ free(name); + } ++ + return( true ); + } + +@@ -2235,6 +2238,7 @@ + + GDrawRequestExpose(kcd->subw,NULL,false); + ++ free(other); + return( new ); + } + +diff -urN fontforge-20170731.old/fontforgeexe/lookupui.c fontforge-20170731/fontforgeexe/lookupui.c +--- fontforge-20170731.old/fontforgeexe/lookupui.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/lookupui.c 2018-09-23 14:54:04.668283976 +0530 +@@ -2779,16 +2779,23 @@ + char *suffix = GGadgetGetTitle8(GWidgetGetControl(pstkd->gw,CID_Suffix)); + SplineChar *alt, *sc; + +- if ( col!=0 || !wasnew || psts[row*cols+0].u.md_str==NULL ) ++ if ( col!=0 || !wasnew || psts[row*cols+0].u.md_str==NULL ){ ++ free(suffix); + return; +- if ( *suffix=='\0' || ( suffix[0]=='.' && suffix[1]=='\0' )) ++ } ++ if ( *suffix=='\0' || ( suffix[0]=='.' && suffix[1]=='\0' )){ ++ free(suffix); + return; ++ } + sc = SFGetChar(pstkd->sf,-1,psts[row*cols+0].u.md_str); +- if ( sc==NULL ) ++ if ( sc==NULL ){ ++ free(suffix); + return; ++ } + alt = SuffixCheck(sc,suffix); + if ( alt!=NULL ) + psts[row*cols+1].u.md_str = copy(alt->name); ++ free(suffix); + } + + static void PSTKD_FinishBoundsEdit(GGadget *g, int row, int col, int wasnew) { +@@ -3403,8 +3410,8 @@ + if ( *suffix!='\0' && ( suffix[0]!='.' || suffix[1]!='\0' )) { + free(pstkd->sub->suffix); + pstkd->sub->suffix = ( *suffix=='.' ) ? copy(suffix+1): copy(suffix); +- free(suffix); + } ++ free(suffix); + } + + static int PSTKD_PopulateWithSuffix(GGadget *g, GEvent *e) { +@@ -3953,6 +3960,8 @@ + error2SFDTrimUndoOldToNew: fclose(nf); + error1SFDTrimUndoOldToNew: fclose(retf); + error0SFDTrimUndoOldToNew: ++ free(nglyph); ++ free(oglyph); + return 0; + } + +@@ -4229,9 +4238,11 @@ + dlist_pushfront( (struct dlistnode **)&sf->undoes, (struct dlistnode *)undo ); + } + // printf("we now have %d splinefont level undoes\n", dlist_size((struct dlistnode **)&sf->undoes)); ++ free(str); + } + + pstkd->done = true; ++ free(oldsfd); + } + return( true ); + } +@@ -6069,6 +6080,7 @@ + while ( (lang = StrNextLang(&pt))!=0 ) { + if ( lang==0xffffffff ) { + ff_post_error(_("Invalid language"), _("Please specify a comma separated list of 4 letter opentype language tags")); ++ free(langs); + return( true ); + } + } +diff -urN fontforge-20170731.old/fontforgeexe/macencui.c fontforge-20170731/fontforgeexe/macencui.c +--- fontforge-20170731.old/fontforgeexe/macencui.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/macencui.c 2018-09-23 14:50:31.592567158 +0530 +@@ -425,6 +425,7 @@ + nd->done = true; + } + } ++ free(temp); + return( true ); + } + +diff -urN fontforge-20170731.old/fontforgeexe/metricsview.c fontforge-20170731/fontforgeexe/metricsview.c +--- fontforge-20170731.old/fontforgeexe/metricsview.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/metricsview.c 2018-09-23 14:50:31.592567158 +0530 +@@ -1970,8 +1970,11 @@ + if ( *pt!=mv->chars[i]->unicodeenc && + !MVOddMatch(mv,*pt,mv->chars[i])) + break; +- if ( i==mv->clen && *pt=='\0' ) +-return; /* Nothing changed */ ++ if ( i==mv->clen && *pt=='\0' ){ ++ free(pt); ++return; ++ } ++ /* Nothing changed */ + for ( ept=ret+u_strlen(ret)-1, ei=mv->clen-1; ; --ei, --ept ) + if ( ei<0 || eptchars[ei]->unicodeenc && + !MVOddMatch(mv,*ept,mv->chars[ei]))) { +@@ -2046,6 +2049,7 @@ + + selectUserChosenWordListGlyphs( mv, wll ); + GDrawRequestExpose(mv->v,NULL,false); ++ free(pt); + } + + GTextInfo mv_text_init[] = { +diff -urN fontforge-20170731.old/fontforgeexe/mmdlg.c fontforge-20170731/fontforgeexe/mmdlg.c +--- fontforge-20170731.old/fontforgeexe/mmdlg.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/mmdlg.c 2018-09-23 14:50:31.593567143 +0530 +@@ -1980,6 +1980,7 @@ + enc = default_encoding; + FVReencode((FontViewBase *) fv,enc); + mmw->done = true; ++ free(setto); + } + + static void MMW_DoNext(MMW *mmw) { +@@ -2374,17 +2375,19 @@ + if ( ti!=NULL && ti->userdata == (void *) -1 ) { + temp = GetPostScriptFontName(NULL,false); + if ( temp==NULL ) +-return(true); ++ return(true); + sf = LoadSplineFont(temp,0); + free(temp); temp = NULL; + if ( sf==NULL ) +-return(true); ++ return(true); + if ( sf->cidmaster!=NULL || sf->subfonts!=0 ) { + ff_post_error(_("Bad Multiple Master Font"),_("CID keyed fonts may not be a master design of a multiple master font")); +-return(true); ++ free(sf); ++ return(true); + } else if ( sf->mm!=NULL ) { + ff_post_error(_("Bad Multiple Master Font"),_("CID keyed fonts may not be a master design of a multiple master font")); +-return(true); ++ free(sf); ++ return(true); + } + if ( sf->fv==NULL ) { + if ( mmw->lcnt>=mmw->lmax ) { +@@ -2406,6 +2409,7 @@ + GGadgetSetTitle(g,ut = uc_copy(sf->fontname)); + free(ut); + } ++ free(sf); + } + return( true ); + } +diff -urN fontforge-20170731.old/fontforgeexe/prefs.c fontforge-20170731/fontforgeexe/prefs.c +--- fontforge-20170731.old/fontforgeexe/prefs.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/prefs.c 2018-09-23 14:50:31.593567143 +0530 +@@ -2380,6 +2380,7 @@ + hvarray[si++] = &pgcd[gc-1]; + hvarray[si++] = GCD_ColSpan; hvarray[si++] = GCD_ColSpan; + y += 28; ++ free(nlnames); + } break; + case pr_string: case pr_file: + if ( pl->set==SetAutoTraceArgs || ((char **) pl->val)==&mf_args ) +@@ -2955,6 +2956,7 @@ + hvarray[si++] = &pgcd[gc-1]; + hvarray[si++] = GCD_ColSpan; hvarray[si++] = GCD_ColSpan; + y += 28; ++ free(nlnames); + } break; + case pr_string: case pr_file: + if ( pl->set==SetAutoTraceArgs || ((char **) pl->val)==&mf_args ) +diff -urN fontforge-20170731.old/fontforgeexe/savefontdlg.c fontforge-20170731/fontforgeexe/savefontdlg.c +--- fontforge-20170731.old/fontforgeexe/savefontdlg.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/savefontdlg.c 2018-09-23 14:50:31.594567127 +0530 +@@ -1426,8 +1426,10 @@ + oldbitmapstate = GGadgetGetFirstListSelectedItem(d->bmptype); + if ( oldbitmapstate!=bf_none ) + sizes = ParseBitmapSizes(d->bmpsizes,_("Pixel List"),&err); +- if ( err ) ++ if ( err ){ ++ free(temp); + return; ++ } + if ( oldbitmapstate==bf_nfntmacbin && oldformatstate!=ff_pfbmacbin && !nfnt_warned ) { + nfnt_warned = true; + ff_post_notice(_("The 'NFNT' bitmap format is obsolete"),_("The 'NFNT' bitmap format is not used under OS/X (though you still need to create a (useless) bitmap font if you are saving a type1 PostScript resource)")); +@@ -1484,7 +1486,9 @@ + d->done = true; + d->ret = false; + SFValidationWindow(d->sf,layer,oldformatstate); +-return; ++ free(sizes); ++ free(temp); ++ return; + } + /* Ok... they want to proceed */ + } +@@ -1581,6 +1585,7 @@ + free(temp); + d->done = !err; + d->ret = !err; ++ free(cur); + } + + static void GFD_doesnt(GIOControl *gio) { +@@ -2109,6 +2114,7 @@ + } + if ( MacStyleCode(sf,NULL)!=0 || familycnt<=1 || sf->multilayer ) { + ff_post_error(_("Bad Mac Family"),_("To generate a Mac family file, the current font must have plain (Normal, Regular, etc.) style, and there must be other open fonts with the same family name.")); ++ free(familysfs); + return( 0 ); + } else if ( dup ) { + MacStyleCode(dup,&psstyle); +diff -urN fontforge-20170731.old/fontforgeexe/scstylesui.c fontforge-20170731/fontforgeexe/scstylesui.c +--- fontforge-20170731.old/fontforgeexe/scstylesui.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/scstylesui.c 2018-09-23 14:50:31.594567127 +0530 +@@ -2323,6 +2323,7 @@ + FVTrans((FontViewBase *) fv,sc,transform,NULL,fvt_dontmovewidth); + } + } ++ free(ret); + } + + +diff -urN fontforge-20170731.old/fontforgeexe/sftextfield.c fontforge-20170731/fontforgeexe/sftextfield.c +--- fontforge-20170731.old/fontforgeexe/sftextfield.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/sftextfield.c 2018-09-23 14:50:31.594567127 +0530 +@@ -702,8 +702,10 @@ + } + for ( cnt=0; scriptlangs[cnt]!=NULL; ++cnt ); + i = ff_choose(_("Text from script"),(const char **) scriptlangs,cnt,0,_("Insert random text in the specified script")); +- if ( i==-1 ) ++ if ( i==-1) { ++ free(freq); + return; ++ } + pos = strlen(scriptlangs[i])-10; + script = (scriptlangs[i][pos+0]<<24) | + (scriptlangs[i][pos+1]<<16) | +@@ -2303,6 +2305,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +@@ -2323,6 +2326,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +@@ -2345,6 +2349,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +@@ -2365,6 +2370,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +@@ -2385,6 +2391,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +@@ -2401,6 +2408,7 @@ + } + + SFTFMetaChangeCleanup(st,start,end); ++ free(fl); + return( true ); + } + +diff -urN fontforge-20170731.old/fontforgeexe/statemachine.c fontforge-20170731/fontforgeexe/statemachine.c +--- fontforge-20170731.old/fontforgeexe/statemachine.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/statemachine.c 2018-09-23 14:50:31.595567112 +0530 +@@ -438,6 +438,7 @@ + + /* Show changes in main window */ + GDrawRequestExpose(smd->gw,NULL,false); ++ free(ret8); + return( true ); + } + +diff -urN fontforge-20170731.old/fontforgeexe/wordlistparser.c fontforge-20170731/fontforgeexe/wordlistparser.c +--- fontforge-20170731.old/fontforgeexe/wordlistparser.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/fontforgeexe/wordlistparser.c 2018-09-23 14:50:31.595567112 +0530 +@@ -799,7 +799,8 @@ + if( element_selected ) + uc_strcat( ret, "]" ); + } +- ++ ++ free(wll); + return ret; + } + +@@ -841,6 +842,7 @@ + { + // we can't go back manually! + u_strcpy( ret, original_data ); ++ free(wll); + return ret; + } + } +@@ -862,6 +864,7 @@ + uc_strcat( ret, "]" ); + } + ++ free(wll); + return ret; + } + +diff -urN fontforge-20170731.old/gdraw/gimageclut.c fontforge-20170731/gdraw/gimageclut.c +--- fontforge-20170731.old/gdraw/gimageclut.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gdraw/gimageclut.c 2018-09-23 14:50:31.595567112 +0530 +@@ -460,9 +460,10 @@ + + if ( clut==NULL ) + clut = malloc(sizeof(GClut)); +- if ( clutmax<2 || clut==NULL ) ++ if ( clutmax<2 || clut==NULL ){ ++ free(clut); + return( 0 ); +- ++ } + clut->clut_len = 0; clut->is_grey = false; + if ( clutmax>256 ) clutmax = 256; + +@@ -555,14 +556,24 @@ + if ( test->next==NULL ) + return( (GCol *) test ); + +- if (( best = (r-test->red))<0 ) best = -best; +- if (( t = (g-test->green))<0 ) t = -t; best += t; +- if (( t = (b-test->blue))<0 ) t = -t; best += t; ++ if (( best = (r-test->red))<0 ) ++ best = -best; ++ if (( t = (g-test->green))<0 ) ++ t = -t; ++ best += t; ++ if (( t = (b-test->blue))<0 ) ++ t = -t; ++ best += t; + bestcol = test; + for ( test=test->next; test!=NULL; test = test->next ) { +- if (( val = (r-test->red))<0 ) val = -val; +- if (( t = (g-test->green))<0 ) t = -t; val += t; +- if (( t = (b-test->blue))<0 ) t = -t; val += t; ++ if (( val = (r-test->red))<0 ) ++ val = -val; ++ if (( t = (g-test->green))<0 ) ++ t = -t; ++ val += t; ++ if (( t = (b-test->blue))<0 ) ++ t = -t; ++ val += t; + if ( valnext==NULL && this->cols[1]==NULL ) + return( (GCol *) test ); + +- if (( best = (r-test->red))<0 ) best = -best; +- if (( t = (g-test->green))<0 ) t = -t; best += t; +- if (( t = (b-test->blue))<0 ) t = -t; best += t; ++ if (( best = (r-test->red))<0 ) ++ best = -best; ++ if (( t = (g-test->green))<0 ) ++ t = -t; ++ best += t; ++ if (( t = (b-test->blue))<0 ) ++ t = -t; ++ best += t; + bestcol = test; + for ( test=test->next; test!=NULL; test = test->next ) { +- if (( val = (r-test->red))<0 ) val = -val; +- if (( t = (g-test->green))<0 ) t = -t; val += t; +- if (( t = (b-test->blue))<0 ) t = -t; val += t; ++ if (( val = (r-test->red))<0 ) ++ val = -val; ++ if (( t = (g-test->green))<0 ) ++ t = -t; ++ val += t; ++ if (( t = (b-test->blue))<0 ) ++ t = -t; ++ val += t; + if ( valcols[1]; test!=NULL; test = test->next ) { +- if (( val = (r-test->red))<0 ) val = -val; +- if (( t = (g-test->green))<0 ) t = -t; val += t; +- if (( t = (b-test->blue))<0 ) t = -t; val += t; ++ if (( val = (r-test->red))<0 ) ++ val = -val; ++ if (( t = (g-test->green))<0 ) ++ t = -t; ++ val += t; ++ if (( t = (b-test->blue))<0 ) ++ t = -t; ++ val += t; + if ( valnext ) { +- if ( (off = (r-test->red))<0 ) off = -off; +- if ( (t = (g-test->green))<0 ) t = -t; off +=t; +- if ( (b = (g-test->blue))<0 ) t = -t; off +=t; ++ if ( (off = (r-test->red))<0 ) ++ off = -off; ++ if ( (t = (g-test->green))<0 ) ++ t = -t; ++ off +=t; ++ if ( (b = (g-test->blue))<0 ) ++ t = -t; ++ off +=t; + if ( offred))<0 ) off = -off; +- if ( (t = (g-old->green))<0 ) t = -t; off +=t; +- if ( (b = (g-old->blue))<0 ) t = -t; off +=t; ++ if ( (off = (r-old->red))<0 ) ++ off = -off; ++ if ( (t = (g-old->green))<0 ) ++ t = -t; ++ off +=t; ++ if ( (b = (g-old->blue))<0 ) ++ t = -t; ++ off +=t; + if ( off=12) ? rq.point_size-2 : rq.point_size>=10 ? rq.point_size-1 : rq.point_size; + rq.weight = 700; +- gmatrixedit_titfont = GResourceFindFont("GMatrixEdit.TitleFont",GDrawInstanciateFont(NULL,&rq)); ++ gtitfont = GDrawInstanciateFont(NULL,&rq); ++ gmatrixedit_titfont = GResourceFindFont("GMatrixEdit.TitleFont",gtitfont); + gmatrixedit_title_bg = GResourceFindColor("GMatrixEdit.TitleBG",gmatrixedit_title_bg); + gmatrixedit_title_fg = GResourceFindColor("GMatrixEdit.TitleFG",gmatrixedit_title_fg); + gmatrixedit_title_divider = GResourceFindColor("GMatrixEdit.TitleDivider",gmatrixedit_title_divider); +diff -urN fontforge-20170731.old/gdraw/gmenu.c fontforge-20170731/gdraw/gmenu.c +--- fontforge-20170731.old/gdraw/gmenu.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gdraw/gmenu.c 2018-09-23 14:50:31.596567096 +0530 +@@ -145,6 +145,7 @@ + menu_3d_look = GResourceFindBool("GMenu.3DLook", menu_3d_look); + gmenubar_inited = true; + _GGroup_Init(); ++ free(keystr); + } + + typedef struct gmenu { +@@ -388,8 +389,12 @@ + strcat(buffer,"."); + if( stack[i]->ti.text_untranslated ) + { +-// TRACE("adding %s\n", HKTextInfoToUntranslatedTextFromTextInfo( &stack[i]->ti )); +- strcat( buffer, HKTextInfoToUntranslatedTextFromTextInfo( &stack[i]->ti )); ++ char *res; ++ res = calloc(PATH_MAX, sizeof(char)); ++ res = HKTextInfoToUntranslatedTextFromTextInfo( &stack[i]->ti ); ++// TRACE("adding %s\n", res); ++ strcat( buffer, res); ++ free(res); + } + else if( stack[i]->ti.text ) + { +diff -urN fontforge-20170731.old/gdraw/gpstxtinit.c fontforge-20170731/gdraw/gpstxtinit.c +--- fontforge-20170731.old/gdraw/gpstxtinit.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gdraw/gpstxtinit.c 2018-09-23 14:50:31.596567096 +0530 +@@ -503,6 +503,7 @@ + } + } + fonts->names_loaded = true; ++ free(path); + return( fonts->names_loaded ); + } + +diff -urN fontforge-20170731.old/gdraw/gtextinfo.c fontforge-20170731/gdraw/gtextinfo.c +--- fontforge-20170731.old/gdraw/gtextinfo.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gdraw/gtextinfo.c 2018-09-23 14:50:31.597567080 +0530 +@@ -582,6 +582,7 @@ + free(fname); + ri->filename = fname = absname; + } ++ free(absname); + } + if ( ret==NULL ) { + ri->filename = NULL; +diff -urN fontforge-20170731.old/gdraw/gxdraw.c fontforge-20170731/gdraw/gxdraw.c +--- fontforge-20170731.old/gdraw/gxdraw.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gdraw/gxdraw.c 2018-09-23 14:50:31.597567080 +0530 +@@ -910,7 +910,6 @@ + } + if ( (wattrs->mask&wam_ititle) && wattrs->icon_title!=NULL ) { + XmbSetWMProperties(display,nw->w,NULL,(pt = u2def_copy(wattrs->icon_title)),NULL,0,NULL,NULL,NULL); +- free(pt); + } + if ( (wattrs->mask&wam_utf8_wtitle) && wattrs->utf8_window_title!=NULL ) { + #ifdef X_HAVE_UTF8_STRING +@@ -918,7 +917,7 @@ + #else + unichar_t *tit = utf82u_copy(wattrs->utf8_window_title); + XmbSetWMProperties(display,nw->w,(pt = u2def_copy(tit)),NULL,NULL,0,NULL,NULL,NULL); +- free(pt); free(tit); ++ free(tit); + #endif + } + if ( (wattrs->mask&wam_utf8_ititle) && wattrs->utf8_icon_title!=NULL ) { +@@ -927,7 +926,7 @@ + #else + unichar_t *tit = utf82u_copy(wattrs->utf8_icon_title); + XmbSetWMProperties(display,nw->w,NULL,(pt = u2def_copy(tit)),NULL,0,NULL,NULL,NULL); +- free(pt); free(tit); ++ free(tit); + #endif + } + s_h.x = pos->x; s_h.y = pos->y; +diff -urN fontforge-20170731.old/gutils/gimagereadrgb.c fontforge-20170731/gutils/gimagereadrgb.c +--- fontforge-20170731.old/gutils/gimagereadrgb.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gutils/gimagereadrgb.c 2018-09-23 14:50:31.597567080 +0530 +@@ -313,6 +313,7 @@ + free(r); free(g); free(b); free(a); + } + } ++ free(fp); + return( ret ); + + errorGImageReadRgbFile: +diff -urN fontforge-20170731.old/gutils/gioftp.c fontforge-20170731/gutils/gioftp.c +--- fontforge-20170731.old/gutils/gioftp.c 2017-07-31 03:19:01.000000000 +0530 ++++ fontforge-20170731/gutils/gioftp.c 2018-09-23 14:50:31.598567065 +0530 +@@ -697,6 +697,7 @@ + if ( ctl!=-1 ) close(ctl); + free(path); + free(host); free(username); free(password); ++ free(had); + return( NULL ); + } + +diff -urN fontforge-20170731.old/pycontrib/FontCompare/fc/GlyphConsistency.py fontforge-20170731/pycontrib/FontCompare/fc/GlyphConsistency.py +--- fontforge-20170731.old/pycontrib/FontCompare/fc/GlyphConsistency.py 2018-09-21 13:53:18.533769952 +0530 ++++ fontforge-20170731/pycontrib/FontCompare/fc/GlyphConsistency.py 2018-09-23 14:50:31.598567065 +0530 +@@ -83,7 +83,7 @@ + if not font[i].boundingBox()[3] in ymax_cords: + ymax_cords.append(font[i].boundingBox()[3]) + if not font[i].left_side_bearing in lbearing: +- rbearing.append(font[i].left_side_bearing) ++ lbearing.append(font[i].left_side_bearing) + if not font[i].right_side_bearing in rbearing: + rbearing.append(font[i].right_side_bearing) + if not font[i].layer_cnt in layer_cnts: diff --git a/SPECS/fontforge.spec b/SPECS/fontforge.spec new file mode 100644 index 0000000..1ace43b --- /dev/null +++ b/SPECS/fontforge.spec @@ -0,0 +1,643 @@ +%global gettext_package FontForge +%global gnulib_githead 2bf7326 +%global gittag0 20170731 + +Name: fontforge +Version: %{gittag0} +Release: 8%{?dist} +Summary: Outline and bitmap font editor + +License: GPLv3+ +URL: http://fontforge.github.io/ +Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz +# https://github.com/fontforge/fontforge/issues/1725 +Source1: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=%{gnulib_githead};sf=tgz;name=gnulib-%{gnulib_githead}.tar.gz +# https://github.com/fontforge/fontforge/pull/1723 +Patch0: fontforge-20140813-use-system-uthash.patch +# Fedora specific patch to have python3 support only +Patch1: Add-python3-support.patch +Patch2: fontforge-20170731-covscan-issue-fix.patch + +Requires: xdg-utils +Requires: autotrace +Requires: hicolor-icon-theme + +BuildRequires: gcc +BuildRequires: git +BuildRequires: libjpeg-devel +BuildRequires: libtiff-devel +BuildRequires: libpng-devel +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 +BuildRequires: pango-devel +BuildRequires: cairo-devel +BuildRequires: libspiro-devel +BuildRequires: python3-devel +BuildRequires: libtool-ltdl-devel +BuildRequires: libtool +BuildRequires: readline-devel +# This is failing on aarch64 so drop it +#BuildRequires: python-ipython +BuildRequires: uthash-devel +# F25 build is failing add following to fix +BuildRequires: shared-mime-info + +Provides: bundled(gnulib) + +%description +FontForge (former PfaEdit) is a font editor for outline and bitmap +fonts. It supports a range of font formats, including PostScript +(ASCII and binary Type 1, some Type 3 and Type 0), TrueType, OpenType +(Type2) and CID-keyed fonts. + +%package devel +Summary: Development tools for fontforge +Requires: %{name} = %{version}-%{release} +Requires: %{name}-doc = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package includes the libraries and header files you will need +to compile applications against fontforge. + +%package doc +Summary: Documentation files for %{name} +BuildArch: noarch + +%description doc +This package contains documentation files for %{name}. + + +%prep +%autosetup -p1 +tar xzf %{SOURCE1} + +sed -i -e '/^#!\//, 1d' pycontrib/webcollab.py + +mkdir htdocs +cp -pr doc/html/* htdocs +chmod 644 htdocs/nonBMP/index.html +# Fix bad line terminators +%{__sed} -i 's/\r//' htdocs/Big5.txt +%{__sed} -i 's/\r//' htdocs/corpchar.txt + +%build +./bootstrap --skip-git --gnulib-srcdir=gnulib-%{gnulib_githead} +export CFLAGS="%{optflags} -fno-strict-aliasing" + +%configure PYTHON=python3 +make V=1 %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +rm -f $RPM_BUILD_ROOT%{_libdir}/libg{draw,unicode}.{la,so} + +desktop-file-install \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category X-Fedora \ + desktop/fontforge.desktop + +# The fontforge makefiles install htdocs as well, but we +# prefer to have them under the standard RPM location, so +# remove the extra copy +rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/fontforge + +# remove unneeded .la and .a files +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';' + +# Find translations +%find_lang %{gettext_package} + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/appdata +install -m 644 -p desktop/fontforge.appdata.xml $RPM_BUILD_ROOT%{_datadir}/appdata + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages +install -m 644 -p desktop/fontforge.xml $RPM_BUILD_ROOT%{_datadir}/mime/packages/ + +#Makefile install rules are playing evil here. Let's correct the permission. +#chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/python/graphicore/__init__.py +chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/python/gdraw/_gdraw.py + +chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/css/*.css +chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/js/*.js +chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/js/contentEditable/* + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files -f %{gettext_package}.lang +%doc AUTHORS +%license LICENSE +%{_bindir}/* +%{_libdir}/lib*.so.* +%{_datadir}/applications/*fontforge.desktop +%{_datadir}/fontforge +%{_datadir}/icons/hicolor/*/apps/fontforge.* +%{_mandir}/man1/*.1* +%{_datadir}/mime/packages/fontforge.xml +%{_datadir}/appdata/fontforge.appdata.xml +%{python3_sitearch}/fontforge.so +%{python3_sitearch}/psMat.so + +%files devel +%{_includedir}/fontforge/ +%{_libdir}/lib*.so +%{_libdir}/pkgconfig/*.pc + +%files doc +%doc htdocs + +%changelog +* Tue Oct 30 2018 Parag Nemade - 20170731-8 +- Resolves:rh#1644224 - fix some issues from covscan patch + +* Sat Sep 22 2018 Parag Nemade - 20170731-7 +- Resolves:rh#1602497 - Fix some covscan issues + +* Mon Jul 23 2018 Ray Strode - 20170731-6 +- Drop gnulib BuildReq + +* Sun Feb 11 2018 Sandro Mani - 20170731-5 +- Rebuild (giflib) + +* Wed Feb 07 2018 Fedora Release Engineering - 20170731-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 11 2018 Igor Gnatenko - 20170731-3 +- Remove obsolete scriptlets + +* Wed Aug 02 2017 Fedora Release Engineering - 20170731-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Mon Jul 31 2017 Parag Nemade - 20170731-1 +- Update to 20170731 + +* Wed Jul 26 2017 Fedora Release Engineering - 20161012-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Mar 09 2017 Parag Nemade - 20161012-6 +- Resolves:rh#1429574 - [abrt] fontforge: PyFF_OpenFont(): fontforge killed by signal 6 +- Added patch to fix python module for python3.6 + +* Sat Feb 18 2017 Parag Nemade - 20161012-5 +- Add missing BR: git + +* Fri Feb 10 2017 Fedora Release Engineering - 20161012-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 20161012-3 +- Rebuild for readline 7.x + +* Mon Dec 19 2016 Miro Hrončok - 20161012-2 +- Rebuild for Python 3.6 + +* Thu Oct 13 2016 Parag Nemade - 20161012-1 +- Update to 20161012 + +* Thu Oct 06 2016 Parag Nemade - 20161005-1 +- Update to 20161005 + +* Wed Oct 05 2016 Parag Nemade - 20161004-1 +- Update to 20161004 + +* Mon Oct 03 2016 Parag Nemade - 20161001-1 +- Update to 20161001 + +* Tue Jul 19 2016 Fedora Release Engineering - 20160404-4 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Jul 07 2016 Parag Nemade - 20160404-3 +- Rebuild for new libuninameslist-20160701 build +- Add BuildRequires: shared-mime-info +- Add BuildRequires: gcc + +* Wed Apr 06 2016 Parag Nemade - 20160404-2 +- Move from python2 to python3 support + +* Tue Apr 05 2016 Parag Nemade - 20160404-1 +- Update to 20160404 + +* Wed Feb 03 2016 Fedora Release Engineering - 20150824-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Aug 26 2015 Parag Nemade - 20150824-1 +- Update to 20150824 +- Follow https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Tags + +* Wed Jun 17 2015 Fedora Release Engineering - 20150612-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 13 2015 Parag Nemade - 20150612-1 +- Update to 20150612 + +* Fri May 01 2015 Parag Nemade - 20150430-1 +- Update to 20150430 + +* Mon Mar 30 2015 Parag Nemade - 20150330-1 +- Update to 20150330 +- use %%license macro for LICENSE file + +* Thu Mar 12 2015 Parag Nemade - 20150228-1 +- Update to 20150228 + +* Sun Feb 01 2015 Kevin Fenzi 20141230-2 +- Rebuild for new libspiro + +* Sun Jan 04 2015 Kevin Fenzi 20141230-1 +- Update to 20141230 + +* Tue Sep 09 2014 Parag Nemade - 20140813-3 +- drop BR: python-ipython for aarch64 builds (rh#1139508) + +* Mon Sep 08 2014 Parag Nemade - 20140813-2 +- Add gnulib source for bootstrap as koji don't have network +- Patch Makefile.am to use system uthash-devel +- We also need gnulib-devel + +* Mon Sep 08 2014 Parag Nemade - 20140813-1 +- Update to fontforge 2.0 snapshot 20140813 +- corrected some scriptlets as per packaging guidelines +- Added new subpackage -doc + +* Sat Aug 16 2014 Fedora Release Engineering - 20120731b-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Aug 09 2014 Rex Dieter 20120731b-12 +- update mime scriptlet + +* Sat Jun 07 2014 Fedora Release Engineering - 20120731b-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Sep 02 2013 Parag Nemade - 20120731b-10 +- Revert previously added -Wstrict-aliasing cflags +- We actaully need -fno-strict-aliasing (rh#903288) +- Remove %%defattr() (rh#1003518) +- fontforge.xml should not be executable (rh#1003518) + +* Thu Aug 22 2013 Parag Nemade - 20120731b-9 +- Added cflags -Wstrict-aliasing +- Fixed some compile-time errors from invalid Makefile rules +- Fixed bogus date in changelog + +* Sat Aug 03 2013 Fedora Release Engineering - 20120731b-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Apr 15 2013 Paul Flo Williams - 20120731b-7 +- Don't crash on PDFs with filters we can't understand. Fixes bug #906492 + +* Sat Mar 23 2013 Kevin Fenzi 20120731b-6 +- Add fix for aarch64 support. Fixes bug #925354 + +* Mon Feb 11 2013 Paul Flo Williams - 20120731b-5 +- De-vendorize desktop installation + +* Thu Feb 07 2013 Paul Flo Williams - 20120731b-4 +- Patch for bug #902089, out-of-bounds errors while reading PDFs + +* Fri Jan 18 2013 Adam Tkac - 20120731b-3 +- rebuild due to "jpeg8-ABI" feature drop + +* Tue Nov 27 2012 Kevin Fenzi 20120731b-2 +- Cosmetic cleanups for bug 880472 + +* Thu Aug 02 2012 Paul Flo Williams - 20120731b-1 +- Update to 20120731b (problem with 64-bit builds in first release) + +* Thu Aug 02 2012 Paul Flo Williams - 20120731-1 +- Update to 20120731 + +* Thu Jul 19 2012 Fedora Release Engineering - 20110222-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sun May 06 2012 Kevin Fenzi - 20110222-8 +- Rebuild for new libtiff. + +* Sat Jan 28 2012 Parag Nemade - 2011022-7 +- Add patch for libpng15 + +* Fri Jan 13 2012 Fedora Release Engineering - 20110222-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Dec 06 2011 Adam Jackson - 20110222-5 +- Rebuild for new libpng + +* Thu Apr 07 2011 Parag Nemade - 2011022-4 +- Add patch for multilib. Fixes bug #694409 + +* Thu Mar 31 2011 Paul Flo Williams - 20110222-3 +- Add patch for charview crash. Fixes bug #660376 + +* Thu Mar 17 2011 Kevin Fenzi - 20110222-2 +- Drop sources that are now upstream. Fixes bug #688470 + +* Tue Feb 22 2011 Kevin Fenzi - 20110222-1 +- Update to 20110222 + +* Wed Feb 16 2011 Kevin Fenzi - 20100501-7 +- Fix patch for python. Fixes bug #677917 +- Add patch for unicode glyph crash. Fixes bug #631172 + +* Tue Feb 08 2011 Fedora Release Engineering - 20100501-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Dec 04 2010 Kevin Fenzi - 20100501-5 +- Add patch for CVE-2010-4259 + +* Wed Jul 28 2010 Kevin Fenzi - 20100501-4 +- Add patch to build with python 2.7 + +* Wed Jul 21 2010 David Malcolm - 20100501-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Jul 16 2010 Kevin Fenzi - 20100501-2 +- Add patch for bug 536920 + +* Wed May 19 2010 Kevin Fenzi - 20100501-1 +- Update to 20100501 + +* Fri Apr 30 2010 Kevin Fenzi - 20100429-1 +- Update to 20100429 + +* Sat Mar 20 2010 Kevin Fenzi - 20090923-3 +- Fix patch to fix python module (fixes #560277) + +* Wed Dec 30 2009 Kevin Fenzi - 20090923-2 +- Add patch to fix relative paths for fontlint (fixes #530760) + +* Sun Nov 01 2009 Kevin Fenzi - 20090923-1 +- Upgrade to 20090923 + +* Fri Jul 24 2009 Fedora Release Engineering - 20090622-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 16 2009 Kevin Fenzi - 20090622-1 +- Upgrade to 20090622 + +* Thu Apr 16 2009 Kevin Fenzi - 20090408-1 +- Upgrade to 20090408 + +* Thu Apr 02 2009 Kevin Fenzi - 20090224-2 +- Apply patch for python modules loading (fixes #489109) +- use install -p to fix multiarch issue (fixes #480685) + +* Thu Feb 26 2009 Kevin Fenzi - 20090224-1 +- Upgrade to 20090224 + +* Tue Feb 24 2009 Fedora Release Engineering - 20081224-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 23 2009 Nicolas Mailhot +- 20081224-2 +— global-ization + +* Fri Feb 20 2009 Kevin Fenzi - 20081224-1 +- Upgrade to 20081224 +- Enable python bindings + +* Wed Jan 21 2009 Kevin Fenzi - 20081215-4 +- Add python-devel to BuildRequires + +* Tue Dec 23 2008 Kevin Fenzi - 20081215-3 +- Add patch to fix buffer overflow. Fixes 471538 + +* Wed Dec 17 2008 Kevin Fenzi - 20081215-2 +- Add libspiro-devel to build with spiro + +* Tue Dec 16 2008 Kevin Fenzi - 20081215-1 +- Upgrade to 20081215 +- Build with cairo and pango + +* Mon Dec 01 2008 Kevin Fenzi - 20081117-1 +- Upgrade to 20081117 + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 20080927-2 +- Rebuild for Python 2.6 + +* Sat Nov 08 2008 Nicolas Mailhot +- 20080927-1 +☢ quick & dirty version bump to start working on F11 font packages +⟲ time to forget about pfaedit +⤑ take care of rpmlint warnings + +* Wed Sep 03 2008 Kevin Fenzi - 20080828-1 +- Upgrade to 20080828 +- Add Requires on autotrace. Fixes 460668 +- Confirm patch from 459451 is upstream here. + +* Fri May 16 2008 Kevin Fenzi - 20080429-1 +- Upgrade to 20080429 + +* Mon Mar 24 2008 Kevin Fenzi - 20080309-2 +- Add mime info for .sfd files. Fixes 240669 + +* Mon Mar 17 2008 Kevin Fenzi - 20080309-1 +- Upgrade to 20080309 +- Fixes bug 437833 + +* Mon Mar 03 2008 Kevin Fenzi - 20080302-2 +- Commit new sources + +* Mon Mar 03 2008 Kevin Fenzi - 20080302-1 +- Update to upstream 20080302 + +* Sun Mar 02 2008 Kevin Fenzi - 20080203-2 +- Change Requires from htmlview to xdg-utils (bz 312691) + +* Sat Mar 01 2008 Kevin Fenzi - 20080203-1 +- Update to upstream 20080203 +- Add new devel subpackage + +* Sun Dec 02 2007 Roozbeh Pournader - 20071110-1 +- Update to upstream 20071110 + +* Sun Oct 21 2007 Nicolas Mailhot +☢ 20071002-1 +⚠ quick & dirty version bump to start working on F9 font packages + +* Sun Aug 26 2007 Kevin Fenzi - 20070511-2 +- Rebuild for BuildID + +* Thu Jun 7 2007 Kevin Fenzi - 20070511-1 +- Update to upstream 20070511 +- Remove some leftover CVS bits +- Remove useless .pc file. + +* Fri Dec 22 2006 Roozbeh Pournader - 20061220-1 +- Update to upstream 20061220 + +* Sat Dec 09 2006 Roozbeh Pournader - 20061025-2 +- Add patch to fix fsSelection problem with DejaVu ExtraLight + +* Sat Nov 25 2006 Roozbeh Pournader - 20061025-1 +- Update to 20061025 +- Patch to correct usFirstCharIndex (George Williams) + +* Fri Oct 20 2006 Kevin Fenzi - 20061019-1 +- Update to 20061019 + +* Thu Oct 05 2006 Christian Iseli 20060822-2 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Thu Sep 21 2006 Kevin Fenzi - 20060822-1 +- Update to 20060822 +- Remove unneeded patch +- Add flag to compile right with giflib + +* Sun Jun 18 2006 Roozbeh Pournader - 20060125-7 +- Add BuildRequires on gettext, to make sure the package builds in minimal + mock environments + +* Mon Feb 13 2006 Roozbeh Pournader - 20060125-6 +- Rebuild for Fedora Extras 5 + +* Sun Feb 12 2006 Roozbeh Pournader - 20060125-5 +- Add patch to fix crash (#181052, George Williams) + +* Wed Feb 01 2006 Roozbeh Pournader - 20060125-4 +- Add "BuildRequires:" on libXt-devel and xorg-x11-proto-devel + +* Wed Feb 01 2006 Roozbeh Pournader - 20060125-3 +- Really remove XFree86-devel BuildReq + +* Wed Feb 01 2006 Roozbeh Pournader - 20060125-2 +- Remove XFree86-devel BuildReq + +* Wed Feb 01 2006 Roozbeh Pournader - 20060125-1 +- Update to 20060125 (bug #170177) +- Update docs to 20060114 +- Change versioning to reflect upstream and follow packaging guidelines +- Provide pfaedit (bug #176548) +- Use %%{?dist} tag (bug #176472) +- Add localizations +- No need to remove CVS subdir: fixed upstream +- No need to covert man pages to UTF-8: fixed upstream +- Fixed DOS line terminators +- Use parallel build + +* Sat Jul 30 2005 Owen Taylor - 0.0-2.20050729.fc4 +- Update to 20050729 +- Remove .docview patch, looking for HTMLview is upstream so no longer needed + +* Tue May 10 2005 Owen Taylor - 0.0-2.20050502.fc4 +- Update to 20050502 +- Fix the build to look for the docs where we install them + +* Sat Mar 19 2005 Owen Taylor - 0.0-2.20050310 +- Update to 20050310 + +* Sat Jan 29 2005 Ville Skyttä - 0:0.0-2.20041231 +- Avoid RPATH. +- Convert man pages to UTF-8. +- Fix pkgconfig and doc file permissions. +- Use updated upstream icon. +- Don't include installation documentation. + +* Mon Jan 17 2005 Marius L. Jøhndal - 0:0.0-1.20041231 +- Updated to 20041231. + +* Thu Oct 28 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20041014 +- Updated to 20041014. + +* Sun Sep 19 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040824 +- Updated to 20040824. + +* Wed Jun 30 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040618 +- Updated to 20040618. + +* Wed Jun 2 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040601 +- Updated to 20040601. + +* Tue May 11 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040509 +- Updated to 20040509. + +* Thu Apr 15 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040410 +- Updated to 20040410. + +* Sun Mar 28 2004 Marius L. Jøhndal - 0:0.0-0.fdr.1.20040321 +- Updated to 20040321. +- Changed package name from pfaedit to fontforge. +- Added Obsoletes: pfaedit. + +* Mon Mar 15 2004 Marius L. Jøhndal - 0:0.0-0.fdr.8.040310 +- Updated to 040310. + +* Sat Feb 7 2004 Marius L. Jøhndal 0:0.0-0.fdr.8.040204 +- Updated to 040204. +- Removed some unnecessary directory ownerships (bug 1061). + +* Sun Jan 25 2004 Marius L. Jøhndal 0:0.0-0.fdr.8.040111 +- Updated documentation to 040111. + +* Sun Jan 11 2004 Marius L. Jøhndal 0:0.0-0.fdr.7.040111 +- Updated to 040111. +- Converted spec file to UTF-8. + +* Wed Jan 7 2004 Marius L. Jøhndal 0:0.0-0.fdr.7.040102 +- Updated to 040102. + +* Sat Dec 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.7.031210 +- Updated to 031210. + +* Sat Dec 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.7.031205 +- Updated to 031205. + +* Fri Nov 28 2003 Marius L. Jøhndal 0:0.0-0.fdr.7.031123 +- Updated to 031123. + +* Wed Nov 12 2003 Marius L. Jøhndal 0:0.0-0.fdr.6.031110 +- Updated to 031110. +- Eliminated build patch; incorporated in upstream tarball. +- Re-added documentation tarball since no longer included in source tarball. +- Added pfaicon.gif as Packaging directory disappeared from tarball. + +* Mon Oct 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.5.031012 +- Refetched sources since upstream suddenly decided to change them (bug 497). + +* Mon Oct 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.4.031012 +- Build req libuninameslist-devel instead of libuninameslist. + +* Mon Oct 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.3.031012 +- Fixed non-standard value in desktop file (bug 497). +- Added libuninameslist support. +- Removed separate documentation tarball; mostly identical to those in source (bug 497). + +* Mon Oct 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.2.031012 +- Patched to use dynamic linking instead of dlopen'ing (bug 497). +- Patched to use htmlview and use installed documentation (bug 497). +- Added build req libxml2-devel (bug 497). +- Disabled parallell make (bug 497). +- Added desktop entry (bug 497). + +* Mon Oct 13 2003 Marius L. Jøhndal 0:0.0-0.fdr.1.031012 +- Updated to 031012. +- Removed .so links. +- Removed empty AUTHORS file. +- Removed the samples subpackage. + +* Mon Sep 22 2003 Marius L. Jøhndal 0:0.0-0.fdr.1.030904 +- Updated to 030904. + +* Wed Sep 3 2003 Marius L. Jøhndal 0:0.0-0.fdr.1.030831 +- Updated to 030831. + +* Tue Aug 12 2003 Marius L. Jøhndal 0:0.0-0.fdr.1.030803 +- Updated to 030803. + +* Mon Jul 21 2003 Marius L. Jøhndal 0:0.0-0.fdr.3.030702 +- Added font samples. +- Added ldconfig to post and postun. +- Added samples subpackage. + +* Sun Jul 6 2003 Marius L. Jøhndal 0:0.0-0.fdr.2.030702 +- Removed README-MS and README-MacOSX from documentation. + +* Thu Jul 3 2003 Marius L. Jøhndal 0:0.0-0.fdr.1.030512 +- Initial RPM release based on Mandrake's PfaEdit-030512 RPM.