ImageFont.truetype loads Mongolian Baiti but getbbox raises OSError: invalid reference
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
- 45/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 14k
- Fork
- 2.6k
- Merge medio
- 1g 1h
- PR unite (30g)
- 205
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di python-pillow/Pillow
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
python-pillow/Pillow#10590 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
python-pillow/Pillow#10589 ·
I maintainer di solito rispondono entro 1 giorno
-
Sun raster files with RLE encoding and odd-width rows decode shiftedForse già presa @PerryLink l’ha presa 21 giorni fa. Aperta🤖-assisted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
python-pillow/Pillow#10370 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Warn that pre-applying arabic_reshaper + python-bidi corrupts text on a Raqm buildForse già presa @Syamjith-NK l’ha presa 85 giorni fa. ApertaDocumentation Font Rendering PNG Third Party Framework
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
python-pillow/Pillow#9907 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Example code in ImageText documentation makes incorrect use of get_bbox()Forse già presa @mmporong l’ha presa oggi. ApertaDocumentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
python-pillow/Pillow#10583 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di python-pillow/Pillow
Issue simili
-
[Bug]: DoubleMLData.from_arrays checks the treatment d with force_all_x_finite instead of force_all_d_finiteForse già presa @leninworld l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
DoubleML/doubleml-for-py#471 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
BUG: ZarrTrace fails in init_trace for models with datetime coordinates (object dtype coord array)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
[Bug] Default key routing (JavaStringHash) picks a different partition than the Java client for about half of keysForse già presa @0z5a l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/pulsar-client-go#1575 ·
I maintainer di solito rispondono entro 2 giorni