Comments (10)
I made a PR in Cairo to get the font matrix. If that works, I'll probably make a PR in Luxor to get the font size. JuliaGraphics/Cairo.jl#331
from javis.jl.
Good question. There are two text systems in Cairo: the Toy Api and the Other Api. Neither are that well supported - ie there are lots of Cairo functions that aren't yet implemented, and Cairo.jl has this odd pango business. I've given up trying to understand how it all works.
You will probably want to keep track of a font size and then specify it at the last moment...?
from javis.jl.
I would like to have functions getfontsize
and gethue
or something like that. Such that for our own functions we can access what was recently set. Several options: have that saved in the current drawing inside Luxor itself or build new functions to have it inside Javis or trying to look deeper into Cairo to get it from them.
from javis.jl.
Ah, there's a get color function already - I had the same problem trying to get the current color, so there's this https://github.com/JuliaGraphics/Luxor.jl/blob/9938a58161fc815d3937cb77767ed1eb3d6c3f89/src/basics.jl#L466 - not exported, though.
I wish you'd been around in 2014/15... :)
from javis.jl.
Ah okay that's nice. Then I only need it for font size I guess.
Back then I worked on Javascript stuff I guess. Not sure whether I was aware of Julia back then. Probably not.
from javis.jl.
Okay there is: https://www.cairographics.org/manual/cairo-text.html#cairo-get-font-matrix
which is currently not part of Cairo.jl
from javis.jl.
Btw you might be interested in #24 as well, as this is related to the colors being part of a layer.
from javis.jl.
Great! I think there's lots of room for getting more powerful text features in - can you remember to document the "toy api"/"pro api" aspects of anything new, because it's very confusing when one tries to mix them. For example, text_extents()
only works with the toy api, which cost me quite a few minutes of puzzlement once ... :)
from javis.jl.
I think I need to understand the difference between toy and pro first 😄 I never got much into text before. I'll try to figure it out the next days.
from javis.jl.
Can be used forlatex
once JuliaGraphics/Luxor.jl#104 is merged and when Cairo and Luxor tag a new release 😄
from javis.jl.
Related Issues (20)
- [BUG] Irrational and Integer angles fail in rotation Actions
- [BUG] Documentation error
- Parallel gif rendering HOT 4
- [BUG] Javis breaks windows HOT 4
- Move liveview outside Javis HOT 1
- anim_translate error, error in fourier example[BUG] HOT 13
- [BUG] Not clear what `point` is in `anim_rotate_around( angle , point)` HOT 3
- [BUG] Documenter "edit on github" points to master branch
- [BUG] render fails with StackOverflowError on Tutorial 1 HOT 1
- [BUG] keyword arguments do not match for latex()
- [BUG] Tutorial 6 code issue
- Allow editing multiple videos at the same time. HOT 3
- Two interesting ways to render LaTeX aside from MathJax HOT 1
- [BUG] Luxor automatically in scope
- [BUG] issue with follow_path not working if object start_pos is not origin
- Educational Entropy example
- [BUG] Animation action setting hue works on those created by box but not by JBox HOT 2
- Problem while precompiling Javis HOT 2
- [BUG] Javis.Background and Javis.@JShape undefined HOT 3
- [BUG] When loading Javis get Gtk error HOT 1
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 javis.jl.