Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ttf-converter for openSUSE:Factory 
checked in at 2023-05-06 22:08:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ttf-converter (Old)
 and      /work/SRC/openSUSE:Factory/.ttf-converter.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ttf-converter"

Sat May  6 22:08:35 2023 rev:4 rq:1084993 version:1.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/ttf-converter/ttf-converter.changes      
2020-07-03 00:01:12.173839701 +0200
+++ /work/SRC/openSUSE:Factory/.ttf-converter.new.1533/ttf-converter.changes    
2023-05-06 22:08:38.460532798 +0200
@@ -1,0 +2,9 @@
+Thu May  4 17:26:24 UTC 2023 - Antonio Larrosa <[email protected]>
+
+- Update to version 1.0.7:
+  * Explicitly flush the file for following read operation
+  * Fixed Unused mode warning
+  * Code style cleanups
+  * Update description inside README.md
+
+-------------------------------------------------------------------

Old:
----
  ttf-converter-1.0.6.tar.xz

New:
----
  ttf-converter-1.0.7.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ttf-converter.spec ++++++
--- /var/tmp/diff_new_pack.krFU8B/_old  2023-05-06 22:08:38.976535670 +0200
+++ /var/tmp/diff_new_pack.krFU8B/_new  2023-05-06 22:08:38.980535693 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ttf-converter
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           ttf-converter
-Version:        1.0.6
+Version:        1.0.7
 Release:        0
 Summary:        Python script that converts fonts to TrueType format
 License:        GPL-3.0-only

++++++ _service ++++++
--- /var/tmp/diff_new_pack.krFU8B/_old  2023-05-06 22:08:39.012535871 +0200
+++ /var/tmp/diff_new_pack.krFU8B/_new  2023-05-06 22:08:39.016535893 +0200
@@ -2,8 +2,8 @@
   <service name="tar_scm" mode="disabled">
     <param name="url">https://github.com/antlarr-suse/ttf-converter</param>
     <param name="filename">ttf-converter</param>
-    <param name="version">1.0.6</param>
-    <param name="revision">1.0.6</param>
+    <param name="version">1.0.7</param>
+    <param name="revision">1.0.7</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.krFU8B/_old  2023-05-06 22:08:39.036536005 +0200
+++ /var/tmp/diff_new_pack.krFU8B/_new  2023-05-06 22:08:39.040536026 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/antlarr-suse/ttf-converter</param>
-              <param 
name="changesrevision">30c9627432c2ded1ab65bc3c4c022476edfabfa7</param></service></servicedata>
+              <param 
name="changesrevision">64a18ae18568c450c6f4013a468a3981374e5344</param></service></servicedata>
 (No newline at EOF)
 

++++++ ttf-converter-1.0.6.tar.xz -> ttf-converter-1.0.7.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttf-converter-1.0.6/.gitignore 
new/ttf-converter-1.0.7/.gitignore
--- old/ttf-converter-1.0.6/.gitignore  1970-01-01 01:00:00.000000000 +0100
+++ new/ttf-converter-1.0.7/.gitignore  2023-05-04 19:06:57.000000000 +0200
@@ -0,0 +1,5 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+
+build/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttf-converter-1.0.6/README.md 
new/ttf-converter-1.0.7/README.md
--- old/ttf-converter-1.0.6/README.md   2020-06-30 19:29:39.000000000 +0200
+++ new/ttf-converter-1.0.7/README.md   2023-05-04 19:06:57.000000000 +0200
@@ -1,7 +1,20 @@
 # ttf-converter
-Python script that converts fonts to TrueType format (.ttf)
 
-Note that this script uses the fontforge python bindings, which needs
+This is a Python script that converts fonts to TrueType/OpenType format. It
+uses the FontForge Python bindings to read/process and write any font format.
+Also, as part of the conversion process, the script tries to fix
+inconsistencies and do necessary changes to the font to honor the TTF/OTF
+format specs.
+
+Though TrueType is often used synonymously with outline fonts, it supports
+embedded bitmaps. ttf-converter leaves the glyph kind (outline/bitmapped)
+unchanged.
+
+For converting a font to have scalable outline glyphs, see vfontas instead.
+
+# Dependencies
+
+Note that this script uses the FontForge Python bindings, which need
 to be installed in the system. In SLE / openSUSE Leap / openSUSE
 Tumbleweed, you just need to run:
 
@@ -26,6 +39,6 @@
  ttf-converter --input-dir /usr/share/fonts/Type1 --output-dir generated
  ```
  
- That will read all *.pfa/*.pfb files in the `/usr/share/fonts/Type1`
+ This will read all *.pfa/*.pfb files in the `/usr/share/fonts/Type1`
  directory and generate an output file for each of them in the `generated`
  directory (which will be created if needed)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ttf-converter-1.0.6/ttf-converter 
new/ttf-converter-1.0.7/ttf-converter
--- old/ttf-converter-1.0.6/ttf-converter       2020-06-30 19:29:39.000000000 
+0200
+++ new/ttf-converter-1.0.7/ttf-converter       2023-05-04 19:06:57.000000000 
+0200
@@ -96,7 +96,7 @@
             print(f'Font glyph "{glyph.glyphname}" ({idx}) is missing '
                   'extrema. Adding points... ', end='')
             for mode in ('only_good_rm', 'all'):
-                glyph.addExtrema('only_good_rm')
+                glyph.addExtrema(mode)
                 glyph.validate(True)
                 if not glyph.validation_state & 0x20:
                     break
@@ -209,7 +209,7 @@
         _null = font.createChar(-1, '.null')
         _null.width = width
     glyphs = list(font.glyphs())
-    for idx, glyph in enumerate(glyphs):
+    for glyph in glyphs:
         if glyph.glyphname in ('.notdef', '.null', 'nonmarkingreturn'):
             glyph.width = width
             continue
@@ -222,8 +222,8 @@
         print(f'{glyph.width}... done')
 
 
-def fix_glyph_data(font, shift_unicode_values=[], replace_unicode_values={}):
-    for idx, glyph in enumerate(font.glyphs()):
+def fix_glyph_data(font, shift_unicode_values, replace_unicode_values):
+    for glyph in font.glyphs():
         shift = [x[2] for x in shift_unicode_values
                  if x[0] <= glyph.unicode <= x[1]]
         if glyph.unicode in replace_unicode_values:
@@ -235,7 +235,7 @@
         elif glyph.glyphname.startswith('char'):
             corrected_unicode = int(glyph.glyphname[4:])
         elif glyph.glyphname.startswith('uni'):
-            corrected_unicode = int(glyph.glyphname[3:],16)
+            corrected_unicode = int(glyph.glyphname[3:], 16)
         else:
             continue
 
@@ -245,6 +245,7 @@
         except ValueError:
             print(f'No unicode character name for {glyph.unicode}')
 
+
 def convert_font(input_filename, output_filename=None, output_dir='.',
                  force_monospaced=False,
                  force_family=None, force_subfamily=None):
@@ -346,9 +347,10 @@
         for filename in filenames[1:]:
             if filename.endswith('.gz'):
                 with tempfile.NamedTemporaryFile(suffix='.pcf') as tmpfile:
-                    gzipfile = gzip.open(filename)
-                    print(filename, tmpfile.name)
-                    tmpfile.write(gzipfile.read())
+                    with gzip.open(filename) as gzipfile:
+                        print(filename, tmpfile.name)
+                        tmpfile.write(gzipfile.read())
+                        tmpfile.flush()
                     font.importBitmaps(tmpfile.name)
             else:
                 font.importBitmaps(filename)
@@ -359,12 +361,13 @@
         font.familyname = familyname
         fix_subfamily(font, args.subfamily)
 
-        shift_unicode_values = [[int(z,0) for z in x.split(',')]
+        shift_unicode_values = [[int(z, 0) for z in x.split(',')]
                                 for x in args.shift_unicode_values]
-        replace_unicode_values = dict([[int(z,0) for z in x.split(',')]
+        replace_unicode_values = dict([[int(z, 0) for z in x.split(',')]
                                       for x in args.replace_unicode_values])
 
-        if args.fix_glyph_unicode or shift_unicode_values or 
replace_unicode_values:
+        if (args.fix_glyph_unicode or
+                shift_unicode_values or replace_unicode_values):
             fix_glyph_data(font, shift_unicode_values, replace_unicode_values)
 
         output_filename = fullname.replace(' ', '-') + '.otb'
@@ -421,7 +424,7 @@
                         'rotate180|skew|transmove>,<xoff>,<yoff>)')
 
     parser.add_argument('--version', action='version',
-                        version='%(prog)s 1.0.6')
+                        version='%(prog)s 1.0.7')
 
     args = parser.parse_args()
 

Reply via email to