Comments (2)
Thanks Ryan,
layoutBounds
works perfectly for what I'm currently doing. I just didn't know where to look :)
I want to thank you and treeform for a fantastic suite of packages. I'm using vmath and pixie, in the process of test driving windy and fidget. I'm also eyeing flatty, netty, zippy and spacy. You guys are Nim Rockstars!
from pixie.
The previous version of computeBounds
is now layoutBounds
.
There exists fonts where the previous version of computeBounds
does not work. This is related to some fonts having glyphs for characters that go outside of the glyph typsetting rect (see https://github.com/treeform/pixie/blob/master/tests/fonts/rendered/spans7.png).
Using the previous computeBounds
works for most fonts, but not all. If it works for your purposes, you can simply switch to that and be all good as an easy fix. The new computeBounds
is actually correct, but a little bit more complicated to use to actually get things correct in all cases. Here is how to use it: https://github.com/treeform/pixie/blob/master/tests/test_fonts.nim#L1018
Basically, bounds.wh will work for sizing the image and you'll need to translate the origin a bit by bounds.xy to make room for potentially larger glyphs.
from pixie.
Related Issues (20)
- SVG error does not support non integer width,height
- Request: Text hAlign = JUSTIFY_ALIGN
- Unsupported SVG tag: use [PixieError] HOT 1
- Support other interpolation methods in drawing operations
- Windows GCC error: Pixie doesn't work HOT 1
- Missing library crunchy (added in 5.0.5)? HOT 3
- Doesn't run if compiled using nim cpp? (C++) HOT 2
- Cannot compile pixie 5.0.6 on windows 11 64bit HOT 12
- The API Reference documentation appears to be down HOT 1
- Help: readImage from memory HOT 3
- SVG radialGradient defs/url support HOT 3
- Working with pixel size <= byte HOT 2
- Need a way to access Font.typeface.opentype HOT 4
- The API docs are down and/or overloaded HOT 1
- Gaps sometimes visible between filled paths which share an edge HOT 3
- [Question] Using pixie during compilation phase HOT 1
- QOI decoding does not convert between sRGB and Linear HOT 4
- about clockwise HOT 1
- pixie tests don't support arm64 mac (m1)
- Request for Image.getBase64()
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 pixie.