Skip to content

Form TextField doesn't support Customized Fonts? #3185

Open
@xiaohuilam

Description

@xiaohuilam

Run this code at https://mrrio.github.io/jsPDF/

var {
 
  TextField
} = jsPDF.AcroForm;

var doc = new jsPDF();

doc.addFont("test/reference/MouhitsuBold.ttf", "Mouhitsu", "bold");

doc.setFont("Mouhitsu", "bold"); // set font
doc.setFontSize(20);
doc.text("なに", 20, 20);



doc.text("TextField:", 20, 45);
var textField = new TextField();
textField.Rect = [60, 40, 30, 10];
textField.multiline = true;
textField.value = "なに";
textField.fontName = "Mouhitsu";
textField.fontStyle = "bold";
textField.fieldName = "TestTextBox";
doc.addField(textField);

Activity

HackbrettXXX

HackbrettXXX commented on Jun 16, 2021

@HackbrettXXX
Collaborator

Thanks for the report. Help is welcome :)

jy03187487

jy03187487 commented on Oct 21, 2021

@jy03187487

I also met this issue today.....

Uzlopak

Uzlopak commented on Oct 21, 2021

@Uzlopak
Collaborator

Well. AcroForm is currently not able to use custom fonts. I think this could be a little bit tricky to implement as you have to fix also the corresponding annotations.

TechWizard9999

TechWizard9999 commented on Sep 30, 2023

@TechWizard9999

😊 "I'd be delighted to work on this issue, @xiaohuilam Could you please assign it to me?"

xiaohuilam

xiaohuilam commented on Oct 1, 2023

@xiaohuilam
Author

😊 “我很高兴能解决这个问题,你能把它分配给我吗?”

sorry, i'm not administrator of this repo, i have no permission to assign issues.
perhaps @HackbrettXXX could.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Uzlopak@xiaohuilam@jy03187487@HackbrettXXX@TechWizard9999

        Issue actions

          Form TextField doesn't support Customized Fonts? · Issue #3185 · parallax/jsPDF