ImageFont.truetype loads Mongolian Baiti but getbbox raises OSError: invalid reference
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
- 45/100
Línea de trabajo
Start by reproducing the failure with the supplied Mongolian Baiti font and ImageFont.truetype(...).getbbox("Hello") using both BASIC and RAQM layout engines. Then trace the FreeType measurement call that raises OSError: invalid reference; the issue does not name a source file or test. Done means text measurement and rendering work for this font, or the failure reports a more specific reason.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description:
I'm encountering an issue with the Mongolian Baiti TrueType font (monbaiti.ttf) distributed with Windows.
Pillow successfully loads the font and retrieves its family name, but attempting to measure even basic Latin text raises OSError: invalid reference.
The font renders correctly in a Chromium-based application on Windows.
Environment:
Pillow: 12.3.0
Font: Mongolian Baiti Regular (monbaiti.ttf)
Layout engines tested: BASIC and RAQM
Minimal reproduction:
from PIL import ImageFont
font = ImageFont.truetype("monbaiti.ttf", 32)
print(font.getname()) # Works
print(font.getbbox("Hello")) # OSError: invalid reference
Expected behavior:
Pillow should measure and render the text successfully, or provide a more specific error explaining why the font cannot be rendered.
Actual behavior:
OSError: invalid reference is raised during the underlying FreeType measurement operation.
Additional information:
The failure occurs with both BASIC and RAQM layout engines. The font is readable, and it renders successfully through the browser's font-rendering system.
The font file used for this was taken from the windows font directory.
- Lenguaje dominante
- Python
- Estrellas
- 14k
- Forks
- 2.6k
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 205
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de python-pillow/Pillow
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
python-pillow/Pillow#10590 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
python-pillow/Pillow#10589 ·
Los mantenedores suelen responder en 1 día
-
Sun raster files with RLE encoding and odd-width rows decode shiftedPosiblemente ocupada @PerryLink la tomó hace 21 días. Abierto🤖-assisted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
python-pillow/Pillow#10370 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Warn that pre-applying arabic_reshaper + python-bidi corrupts text on a Raqm buildPosiblemente ocupada @Syamjith-NK la tomó hace 85 días. AbiertoDocumentation Font Rendering PNG Third Party Framework
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
python-pillow/Pillow#9907 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Example code in ImageText documentation makes incorrect use of get_bbox()Posiblemente ocupada @mmporong la tomó hoy. AbiertoDocumentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 25/100
python-pillow/Pillow#10583 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de python-pillow/Pillow
Issues similares
-
[Bug]: DoubleMLData.from_arrays checks the treatment d with force_all_x_finite instead of force_all_d_finitePosiblemente ocupada @leninworld la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
DoubleML/doubleml-for-py#471 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
BUG: ZarrTrace fails in init_trace for models with datetime coordinates (object dtype coord array)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
[Bug] Default key routing (JavaStringHash) picks a different partition than the Java client for about half of keysPosiblemente ocupada @0z5a la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/pulsar-client-go#1575 ·
Los mantenedores suelen responder en 2 días