Comments (4)
Might it be that hieroglyph is using different font and different offset from baseline?
from skija.
Might it be that hieroglyph is using different font and different offset from baseline?
But I use the same font file, how can this happen?
from skija.
Good question! Technically, fonts can provide different metrics (baseline, ascend, descend) for diffrent OSes.
From https://www.maxkohler.com/posts/2022-02-19-fixing-vertical-metrics/
For historical reasons, vertical metrics are stored in three different places (called hhea, OS/2 typo and OS/2 win), and different rendering engines get their information from different ones. Apple devices generally use hhea, Windows uses either OS/2 typo or OS/2 win, and old versions of MS Office use OS/2 win exclusively. If the numbers in these tables aren’t the same, you can end up in a situation where type renders differently in different browsers, design tools, or operating systems.
I wonder if that’s the case here. You can try using something like this https://github.com/source-foundry/font-line to print the metrics (but be sure to figure out which exact font is used for rendering first)
from skija.
Thank you for helping me find this article. Although I modified ascent and percent in OS/2 according to the method in the article, it still doesn't work.
However, I found the each emoji has a offsetY argument in the TTX file, and realized the alignment by modifying this. 😄
from skija.
Related Issues (20)
- LWJGL, JRE Exception: Access Violation @ DirectContext.makeGL HOT 2
- Rect size limit? HOT 2
- Typeface._nMakeFromName returns null on linux HOT 3
- Text Style Scene in examples crashed on linux because of AssertionError HOT 3
- The performance monitor of Text Shape Bench example is abnormal on Linux HOT 1
- Force no antialiasing when painting / set texture filter quality? HOT 4
- Starting two Skija-using applications at the same time may segfault HOT 3
- [Question] Multiple windows with a shared DirectContext? HOT 9
- skija.dll fails to load (windows 10 pro / directx12 ) HOT 11
- Some path effects causing shader compilation errors on macOS HOT 2
- how to get a canvas from Image or Bitmap HOT 3
- Fat/uber Jar doesn't work because of the multi-release feature HOT 2
- Java 8 doesn't work HOT 4
- Memory Leak: Runtime Effect + Runtime generated Images HOT 2
- How to update shader uniforms? HOT 1
- How do we add Metal Kit Device to the surface and render HOT 3
- Canvas not marked as closed when its parent Surface is collected HOT 3
- Create an image from backend texture handle HOT 1
- Doesn't seem to be any way to use LCD font rendering? HOT 9
- JVM CRASHED while Skija initializing on jdk 1.8
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 skija.