Giter Club home page Giter Club logo

inkscapestrokefont's Issues

Sync Fonts doesn't actually sync the fonts

Hi,

I've added some additional fonts to the strokefontdata folder (added the EMS fonts) and then selected Sync Fonts. Nothing seems to happen. When I look the drop downs, nothing has updated.

I thought I read that an XML file is created, but I don't see one.

I've tried just modifying one of the names of the existing fonts to see if that works - not updated.
I've coped the font folder to here:
...AppData\Roaming\inkscape\extensions\inkscapestrokefont-master\strokefontdata

and
...\AppData\Roaming\inkscape\extensions

Thanks

Issues with special characters in generated font file

Windell Oskay commented on my blogpost that there should be no issue with Hershey Text to read special characters and asked me to report it as an issue and provide an example file where Hershey Text fail to read the SVG-font. It seems that the svg-font files I generate with the Custom Stroke Font have incorrect coding (not UTF-8 for real). See more in this issue and what Windell Oskay found. I guess the same is the case when FontForge fail to read the svg-font files from Custom Stroke Font. I can live with my workaround in the blogpost mentioned above, but maybe there is something that could be fixed from within the Custom Stroke Font extension?

using special characters in XML ID for font design

While trying to design a new font, I can't change the XML ID to ":" because Inkscape 1.2 considers this an Invalid ID. (Oddly, If I edit an existing font, it seems to have no problem.).

How is this supposed to work? This seems to be true for other special characters as well.

Edit svg font with missing horiz-adv-x

I was converting a ttf fot to svg using FontForge and when trying to edit this using the Custom Stroke Font - Edit Font it failed and I got nothing. It turned out that there was quite a few glyphs in the svg from FontForge missing the horiz-adv-x attribute. I guess this is a bug in while FontForge generate svg-font (the left/right bearings of those glyphs look fine when inspecting them in FontForge). Anyway - this problem was fixed by changing line 114 of stroke_font_manager.py

From
rOffset = float(e.getAttribute(xROff))

To
if e.getAttribute(xROff) == "":
rOffset = 0
else:
rOffset = float(e.getAttribute(xROff))

Ideally there should be a warning in the end that some (ideally which) glyphs had missing horiz-adv-x and that this is set to 0, or it could be set to the width of the bounding box to have something that might work - not as strange and obviously wrong as 0.

At least this made it possible to continue editing the font. So I'm happy with this solution.

Extension "Custom Stroke Font" errors in Inkscape 1.0beta2

First of all, thank you for your developments. Maybe this can help you improve it ! Best regards.

  • I installed the external extension "inkscapestrokefont" from here
  • open Inkscape
  • menu Extension / "Custom Stroke Font" available
  • errors are appearing for each submenu
  • dialog appears and seems to work fine
    - drop down menus OK
    - entering data OK
    - selecting options OK
  • then click on button apply
    => dialog appears with error message below

SUB MENU 1

  • Select in the submenu "Create Font Design Template"
  • Apply (default values)
  • Inkscape returns message:
    File "stroke_font_templ.py", line 97 try: self.startGlyph = eval("u'\u" + sg + "'") ^ SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \uXXXX escape
  • Nothing happens next.

SUB MENU 2

  • Select in the submenu "Edit Stroke Font"
  • Apply (default values)
  • Inkscape returns message:
    Traceback (most recent call last): File "edit_stroke_font.py", line 31, in <module> from stroke_font_common import CommonDefs, InkscapeCharDataFactory, createTempl File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/stroke_font_common.py", line 84 print getXMLItemsStr(sectMarkerLine, sectMarker, fontNames), ^ SyntaxError: invalid syntax

SUB MENU 3

  • Select in the submenu "Generate Font Data"
  • Apply (default values)
  • Inkscape returns message:

Traceback (most recent call last): File "gen_stroke_font_data.py", line 37, in <module> from stroke_font_common import InkscapeCharData, CommonDefs, \ File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/stroke_font_common.py", line 84 print getXMLItemsStr(sectMarkerLine, sectMarker, fontNames), ^ SyntaxError: invalid syntax

I guess the other menus can generate similar issues, I did not try them.

Inkscape Version and Operating System:

Inkscape Version: 1.0beta2 (2b71d25, 2019-12-03)
Operating System: MacOS X Catalina
Operating System version: 10.15.4

Menu is disabled

I see the Custom Stroke Font menu and sub-menu but they are all grayed out.

Workaround for Inkscape v1.0.2 and v1.1

With Inkscape v1.1 and v1.0.2 in Windows at least the Edit stroke font and Generate font data did not work (did nothing, and no error message). It turns out that this currently have to be fixed by the workaround described in
this issue #2187
(i.e. removing two lines of Inkscape \lib\python3.8\site-packages\numpy\init.py)

Thought you would like to know. Sounds like this will be fixed in the future releases of Inkscape as it applies to other extensions too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.