Skip to content

The 'fontFamily' attribute of the text #1927

Open
@LiuXin-Developer

Description

@LiuXin-Developer

When a piece of text is set with the 'fontFamily' attribute, the width it displays will become incorrect

Image

The correct result should be like this

Image

new Konva.Text({
x: 50,
y: 50,
width: 800,
height: 'auto',
fontFamily: 'zk',
lineHeight: 1,
text: '1111111111111111111111111111111111111111111111111111111111111',
fontSize: 80,
fill: 'red',
draggable: true,
listening: true,
})
@font-face {
  font-family: 'zk2';
  src: url('@/assets/zk.ttf') format('truetype');
}

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