blackfoundrycom / robo-cjk Goto Github PK
View Code? Open in Web Editor NEWRoboFont extension for CJK font development
License: GNU General Public License v3.0
RoboFont extension for CJK font development
License: GNU General Public License v3.0
As discussed during the meeting today, this isn't easy.
In my view, this is what should happen, when a DC or AE gets renamed:
Should this be done at the RoboCJK client level, or is it a task that can be delegated to the server? The latter would be much better for performance.
My assuption: renaming DCs or AEs should be rare, therefore it's an acceptable tradeoff that the procedure to do it is a little slow or cumbersome.
Cc @fabiocaccamo @GaetanBaehr @JeremieHornus @jbmorizot
Also relates to #23: renaming should be impossible to do accidentally, and should require an obnoxious comfirmation dialog.
RoboCJK renames a glyph by:
The last step currently fails, because the lock cannot be acquired. After this the glyph exists twice in the database.
From the Python output window (when trying to rename uni0065
to e
):
uni0065 e
Couldn't acquire the lock for glyph uni0065
or similar mechanism for taking into account changes made outside the SQL API.
A bit similar to the initial 'import' of ZIP .rcjk project but more flexible
Add variations for DC
I don't think RoboCJK uses robocjk.defaultGlyphWidths yet, but it should.
We should probably not have both robocjk.defaultGlyphWidth
(singular) and robocjk.defaultGlyphWidths
(plural) exist at the same time.
Steps to reproduce:
Closing the main RoboCJK window prints a double traceback, as seen below:
Whole session output:
hello
'glyphs_composition_database'
total to load 0.36855602264404297
download glyphs: 0.4906461238861084 seconds to download uni34D3
insert glyphs: 0.25344276428222656 seconds to insert 11
get locked-by: 0.0830538272857666 seconds to get locked-by for uni34D3
calculate preview: 0.38976573944091797 seconds to calculate preview of uni34D3
display glyph: 1.2327070236206055 seconds to display uni34D3
download glyphs: 0.5203819274902344 seconds to download uni34D3
insert glyphs: 0.28034400939941406 seconds to insert 11
download glyphs: 0.4242069721221924 seconds to download uni34D3
insert glyphs: 0.282210111618042 seconds to insert 11
download glyphs: 0.5314168930053711 seconds to download uni34D3
insert glyphs: 0.383991003036499 seconds to insert 11
3.346619129180908 to open a uni34D3
Unlocked glyphs: uni34D3
1.0351390838623047 to close uni34D3
Traceback (most recent call last):
File "/Applications/RoboFont-3.5b.app/Contents/Resources/lib/python3.7/vanilla/vanillaWindows.py", line 604, in windowWillClose_
self._alertBindings("close")
File "/Applications/RoboFont-3.5b.app/Contents/Resources/lib/python3.7/vanilla/vanillaWindows.py", line 596, in _alertBindings
value = callback(self)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/views/roboCJKView.py", line 935, in windowCloses
self.currentFont.saveGlyph(self.currentGlyph)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/models/font.py", line 1075, in saveGlyph
self.client.character_glyph_update(self.uid, glyph.name, xml)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/controllers/client.py", line 815, in character_glyph_update
return self._api_call('character_glyph_update', params)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/controllers/client.py", line 113, in _api_call
raise HTTPError(f"{response.status_code} {response_data['error']}")
controllers.client.HTTPError: 403 Forbidden - Character Glyph object must be locked by the current user.
Traceback (most recent call last):
File "lib/doodleDelegate.pyc", line 96, in sendEvent_
File "/Applications/RoboFont-3.5b.app/Contents/Resources/lib/python3.7/vanilla/vanillaWindows.py", line 604, in windowWillClose_
self._alertBindings("close")
File "/Applications/RoboFont-3.5b.app/Contents/Resources/lib/python3.7/vanilla/vanillaWindows.py", line 596, in _alertBindings
value = callback(self)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/views/roboCJKView.py", line 935, in windowCloses
self.currentFont.saveGlyph(self.currentGlyph)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/models/font.py", line 1075, in saveGlyph
self.client.character_glyph_update(self.uid, glyph.name, xml)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/controllers/client.py", line 815, in character_glyph_update
return self._api_call('character_glyph_update', params)
File "/Users/just/code/git/BlackFoundry/robo-cjk/sources/controllers/client.py", line 113, in _api_call
raise HTTPError(f"{response.status_code} {response_data['error']}")
controllers.client.HTTPError: 403 Forbidden - Character Glyph object must be locked by the current user.
Perhaprs with a validation window
I'm having trouble with the _initWithLib
method on the CharacterGlyph
class.
If certain lib keys aren't available it goes into backwards-compatibility mode, looking for lib keys we no longer use (but may exist in old data), and manages to silently clear a glyph that was perfectly fine in Fontra.
The glyph written to the DB by Fontra does not have these keys:
"robocjk.axes"
: the glyph doesn't have axes yetThis together triggers the observed behavior.
If you open a glyph editor in RoboCJK, then close it, it will never reload the glyph from the server, so any change made by someone else will not be seen.
Scenario:
add the file accodring to the "font infos" to the project on the repo so that one can generate the VarC VF font
the XML files should be formated nicely with proper lines and indents
Of the 622 files touched in this commit, 356 contain a redundant addition of lib, such as this:
This makes it much more difficult to find the relevant diffs than necessary. Can this please be addressed? I've asked for it several times already.
Any user should be able to change his password
a newly created DeepComponent should be named following the required structure of RoboCJK:
DC_0000_00
For example:
glyph.lib["robocjk.skipExport"] = True
A missing key would imply False
, so export is "on" by default.
RoboCJK should have a checkbox UI for this, for character glyphs (it's not needed for DCs or AEs).
(This should have no consequences for the MySQL front-end.)
Will push to git immediately without having to wait 10 minutes for the next synchronisation.
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.