Skip to content

font-family in insert_html does not work #4312

@crazymxm

Description

@crazymxm

Description of the bug

font-family in insert_html does not work.

How to reproduce the bug

The following code specifies the font by style, but it doesn't seem to be taking effect.

html = "<div> <span style = 'font-size: 6pt; color: #231f20; font-family: \"Y001C\";'> W </span>  </div> "
page.insert_htmlbox(rect, html, css="body {margin:0}")

Y001C is a font embedded in the source pdf ( attached file), It is used to draw some special icons. For example, the W character is an upward triangle indicator in this font.
Image

EOS_760D.pdf

PyMuPDF version

No response

Operating system

No response

Python version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    not a bugnot a bug / user error / unable to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions