Code Monkey home page Code Monkey logo

Comments (4)

Lorp avatar Lorp commented on June 10, 2024

All the above are now fixed in 47eb575, apart from static font output. Should not be much more work.

from samsa.

Lorp avatar Lorp commented on June 10, 2024

Composites in Glyphs panel fixed in 933af87

from samsa.

Lorp avatar Lorp commented on June 10, 2024

Composites in Glyphs panel fixed (again) in 8d01802. (Somehow they’d been disabled by being omitted from in instanceApplyVariations() in samsa-core.js)

from samsa.

Lorp avatar Lorp commented on June 10, 2024

Fixed with new SamsaGlyph object and composite handling in ed207a6

Methods for SamsaGlyph:

.instantiate() – to make a glyph instance according to supplied tuple parameter

.decompose() – to decompose a composite glyph into a simple glyph, and taking account of offsets and transform, a much better recursive model than the previous one which was tied to SVG conversion (also respects tuple parameter if supplied)

.svgPath() – make an SVG path "d" string for this glyph (requires simple glyph, such as generated by .decompose()

So glyph decomposition has been decoupled from SVG generation, SVG generation is now limited to simple glyphs. The old function glyphApplyVariations() is replaced with SamsaGlyph.instantiate() and SamsaGlyph.decompose() throughout.

samsa-gui.html updated to use the new SamsaGlyph object and its methods. All code that generated SVGs for glyphs is simplified, since we simply call .decompose().svgPath().

The update fixes various problems with deeply nested composite glyphs including bad component positioning in the Glyphs panel and the main window. Also fixed is SVG animation for composites.

from samsa.

Related Issues (20)

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.