Skip to content

Adobeにて日本語フォントの表示が崩れる #136

@makiRails

Description

@makiRails

直近にて表題のような動作を確認したため、報告いたします。
原因そのものはttfunkにあると考えられます。
gemspecで問題のバージョンが避けられるようになっていればと感じました。
内容確認のお手数となり恐縮ですが、ttfunkの問題が解消したタイミングでスムーズに移行できると幸いです。

■概要

日本語を含むPDFを作成し、Adobe Acrobat Reader で閲覧したところ、以下のようなエラーが表示される。
『埋め込みフォント「bfbd90+IPAMincho」を抽出できません。』
日本語部分が一部空欄になるなど、崩れが発生する。
描画されていないだけで、文字のコピーはできた。

■問題の再現手順、環境

コードは、以下の使用例を改造不要で再現した。
https://github.com/thinreports/thinreports-examples/tree/main/eudc

git clone https://github.com/thinreports/thinreports-examples.git
cd thinreports-examples && git checkout -b testing && cd eudc
bundle install
bundle exec ruby eudc.rb

確認した実行環境は、MacBookPro M1
Acrobat Reader は Mac OS 10.15 - 13.x • Japanese • バージョン 24.002.20687
https://get.adobe.com/jp/reader/

> bundle exec ruby -version
ruby 3.2.3 (2024-01-18 revision 52bb2ac0a6) [arm64-darwin23]

> cat Gemfile.lock
GEM
  remote: https://rubygems.org/
  specs:
    base64 (0.2.0)
    bigdecimal (3.1.7)
    matrix (0.4.2)
    pdf-core (0.10.0)
    prawn (2.5.0)
      matrix (~> 0.4)
      pdf-core (~> 0.10.0)
      ttfunk (~> 1.8)
    prawn-disable_word_break (2.3.1)
      matrix (~> 0.4)
      prawn (>= 2.4.0)
    rexml (3.2.6)
    thinreports (0.14.2)
      base64
      bigdecimal
      matrix
      prawn (>= 2.4.0)
      prawn-disable_word_break (>= 2.3.1)
      rexml
    ttfunk (1.8.0)
      bigdecimal (~> 3.1)

PLATFORMS
  arm64-darwin-23

DEPENDENCIES
  thinreports

BUNDLED WITH
   2.4.19

■直近のアップデートで類似したissue

prawnpdf/ttfunk#102
prawnpdf/prawn#1347

  • prawn: 2.4.0→2.5.0
  • ttfunk: 1.7.0→1.8.0

上記更新を戻してみたところ、問題現象は発生しなかった。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions