ImageFont.truetype loads Mongolian Baiti but getbbox raises OSError: invalid reference
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 14k
- フォーク
- 2.6k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 205
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-pillow/Pillow のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
python-pillow/Pillow#10590 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
python-pillow/Pillow#10589 ·
メンテナーはふだん 1 日以内に返信
-
Sun raster files with RLE encoding and odd-width rows decode shifted対応中かも @PerryLink が 21 日前に担当しました。 オープン🤖-assisted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python-pillow/Pillow#10370 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Warn that pre-applying arabic_reshaper + python-bidi corrupts text on a Raqm build対応中かも @Syamjith-NK が 85 日前に担当しました。 オープンDocumentation Font Rendering PNG Third Party Framework
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
python-pillow/Pillow#9907 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Example code in ImageText documentation makes incorrect use of get_bbox()対応中かも @mmporong が今日担当しました。 オープンDocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
python-pillow/Pillow#10583 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
python-pillow/Pillow の issue をすべて見る
似ている issue
-
[Bug]: DoubleMLData.from_arrays checks the treatment d with force_all_x_finite instead of force_all_d_finite対応中かも @leninworld が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
DoubleML/doubleml-for-py#471 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
BUG: ZarrTrace fails in init_trace for models with datetime coordinates (object dtype coord array)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 2 日以内に返信
-
[Bug] Default key routing (JavaStringHash) picks a different partition than the Java client for about half of keys対応中かも @0z5a が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/pulsar-client-go#1575 ·
メンテナーはふだん 2 日以内に返信