OS/2 vs hhea font metrics for ascender/descender

Abierto
#339 0 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
javascript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?

Lenguaje dominante
JavaScript
Estrellas
1.7k
Forks
254
Merge medio
1 d 14 h
PR fusionados (30 d)
28

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de foliojs/fontkit

Todos los issues de foliojs/fontkit

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.