OS/2 vs hhea font metrics for ascender/descender

Aperta
#339 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript

Direzione di ricerca

Start by reviewing commit 9d1ffe47ed1c4569501530ed9624417e685a5739 and the font-metrics initialization it changed. Reproduce the discrepancy with Trirong Regular and compare PDFKit with troika-three-text against the linked CSS and Microsoft OpenType guidance. Done means documenting the intended metric source or agreeing on a concrete correction.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Quite a while ago this change:

https://github.com/foliojs/fontkit/commit/9d1ffe47ed1c4569501530ed9624417e685a5739

Moved from using OS/2 to hhea metrics for ascender/descender/etc. I'm wondering if there's any record of what motivated this change?

For context, I'm trying to align the rendering output from PDFKit with a WebGL font library (https://www.npmjs.com/package/troika-three-text) and during my investigation I found that PDFKit and the troika text library disagree on these font metrics. This only affects some fonts, e.g. Trirong Regular (https://fonts.google.com/specimen/Trirong?query=trirong).

More context at https://github.com/protectwise/troika/issues/320 . In particular the maintainer noted the library is consistent with the CSS spec and the MS OpenType format docs. Is fontkit potentially doing the wrong thing? Is there a different spec that fontkit uses for its metrics init?

Lingua principale
JavaScript
Stelle
1.7k
Fork
254
Merge medio
1g 19h
PR unite (30g)
29

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di foliojs/fontkit

Tutte le issue di foliojs/fontkit

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.