shriinivas / inkscapestrokefont Goto Github PK
View Code? Open in Web Editor NEWInkscape Extensions For Creating and Using Stroke Fonts
License: GNU General Public License v2.0
Inkscape Extensions For Creating and Using Stroke Fonts
License: GNU General Public License v2.0
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?
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.
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
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.
First of all, thank you for your developments. Maybe this can help you improve it ! Best regards.
SUB MENU 1
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
SUB MENU 2
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
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
I see the Custom Stroke Font menu and sub-menu but they are all grayed out.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.