Comments (8)
Fixed, though some values aren't good.
from printed.
Yes indeed the rendering context should give back text metrics.
We should look at the Canvas API not FreeType imo, since PDF and SVG use the right bearing, horizontal advance between characters, also it would be inefficient to feed character by character instead of at least word by word.
from printed.
I agree, I used feed by glyph as an example only.
from printed.
https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics
from printed.
Depends on #16
from printed.
Implemented width aka advance, further work depends on #17
from printed.
https://www.cairographics.org/manual/cairo-cairo-scaled-font-t.html#cairo-text-extents-t
from printed.
For flow layout we need both horiAdvance
and width
.
from printed.
Related Issues (20)
- Non-optional dependency printed:image of printed not found in dependency tree HOT 3
- Arsd-official conflict HOT 13
- PDF print in blank HOT 9
- Need to make clear which states are save/restored
- Default font crashing HOT 1
- Invalid source/import HOT 5
- Invalid source/import path: `printed-1.0.1/printed/source` HOT 2
- save/restore is broken in SVG HOT 4
- `SVGDocument.strokeRect` ignores `lineWidth` HOT 1
- Enhancement: Make `*Document` classes inheritance-friendly HOT 13
- Range violation HOT 2
- User-directory fonts are not parsed on Windows HOT 11
- Support special font values like "monospace", "sans-serif" HOT 1
- CMAP parsing: Unicode platform ID
- DOM element interface to avoid a big switch on tag name
- Need to parse glyph boxes
- [PDF] fillStyle seemingly overwritten by newPage HOT 1
- fillStyle Alpha infuencing alpha of drawn images, in PDF HOT 1
- Separate beginPath from moveTo
- Remove the Image struct form printed, use the one in Gamut only
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 printed.