Comments (6)
Right now I am not using any font libraries. Boxes.py generates text. So it leaves the rendering of the fonts to the client on all supported formats. This has pros and cons.
The things is if you are only interested in generating texts in different fonts you, too, can leave that to the client side. SVG has much more powerful mechanisms to alter the text that I am using in Boxes.py (which tries to only use simple graphic primitives that can be turned in to different formats).
So unless you want to do something very specific it might not e worth it to reinvent the wheel and create your own ttf library. Especially as there are probably already a few out there. May be you can find one that can be used for the ttf part so you only need to turn the paths into an SVG format, whihc should be relatively simple.
from boxes.
I’d like to know more about converting TTF to SVG fonts. This probably isn’t the right place. Can I contact you separately?
from boxes.
I’d like to know more about converting TTF to SVG fonts. This probably isn’t the right place. Can I contact you separately?
Nah, this is pretty much on topic here.
The issue is more that I do not know much about that topic. In the past Boxes.py was using libcairo as a backend. libcairo puts text in as a graphics as some of its output formats don't have text but are true graphics.
Here is an example on the produced SVG: view-source:https://raw.githubusercontent.com/florianfesti/boxes/6ab0cef413c110947d20b5fd3d414d170c7a2a13/examples/drillbox.svg
So each letter is declared as some
<symbol overflow="visible" id="glyph0-0">
containing a path that draws the letter.
And then used later with a
<use xlink:href="#glyph0-4" x="105.101562" y="333.414062"/>
If that is good enough for you you can use the SVG backend of libcairo. That way you do not need to bother with the details of the fonts at all. You just set the font and place some text sopmewhere and the library handles turning the ttf glyph into a SVG symbol. For Boxes.py we ofc don't want to go back to using libcairo.
from boxes.
Related Issues (20)
- Web site loads slowly HOT 5
- SmallPartsTray2 generates incorrect fingers for inner y dividers
- Document guidance on model influenced edge parameters HOT 2
- Sample Images missing HOT 2
- ElectronicsBox - Lid thickness option HOT 1
- TypeTray FingerHoles + Markingfield HOT 15
- TextArea in GridfinityTrayLayout WWW GUI is now a single line text box; editing difficult / impossible.
- DXF, gcode and PLT generation fails in Web Instance HOT 16
- plt file generator not working HOT 3
- Webpages appears to have lost all layout & styling HOT 6
- Flexbox4 latchsize incorrect dimension HOT 1
- Can Storage, can's can't be taken out
- Shelf for laptop and phone charger pad HOT 8
- Console output during box generation
- boxes does not use versioning
- Broken box generators without arguments HOT 2
- Broken HTML
- Windows build fails with recent master HOT 7
- An error occurred! local variable 'poly' referenced before assignment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boxes.