armortools icon indicating copy to clipboard operation
armortools copied to clipboard

Freeze while importing some fonts

Open MathemanFlo opened this issue 4 years ago • 3 comments

ArmorPaint version: ArmorPaint.org - v0.9 (2021-10-05) - bd87056 Windows - Direct3D11

Issue description: ArmorPaint freezes while importing fonts like Wingdings oder Webdings. It also happens if I import the whole Calibri font family

Steps to reproduce:

  1. Go to C:\Windows\Fonts
  2. Drag and drop Wingdings or Webdings to ArmorPaint
  3. ArmorPaint freezes

MathemanFlo avatar Oct 07 '21 12:10 MathemanFlo

The reason for the freeze is probably that Wingdings and Webdings do not include the glyph "Abg" for preview.

shiena avatar Oct 07 '21 13:10 shiena

The reason for the freeze is probably that Wingdings and Webdings do not include the glyph "Abg" for preview.

I also thought that this is the case but I doubt it, because it also happens for Calibri, which is a "normal" font family and Webdings/Wingdings contains glyphs for A,b and g but they are symbols like a bike in case of b in Webdings.

MathemanFlo avatar Oct 07 '21 13:10 MathemanFlo

Some additional details

    1. Load Webdings (it's a windows font)
    1. stderr contains:
RangeError: Start offset undefined is outside the bounds of the buffer
    at new Uint8Array (<anonymous>)
    at new haxe_io_Bytes (<anonymous>:4560:12)
    at Function.alloc (<anonymous>:4528:23)
    at kha_Font._get (<anonymous>:47109:23)
    at kha_Font.width (<anonymous>:47126:15)
    at Function.makeFontPreview (<anonymous>:14836:21)
    at <anonymous>:24799:26
    at update (<anonymous>:5717:7)
    at kha_TimeTask.task (<anonymous>:5430:4)
    at Function.executeTimeTasks (<anonymous>:5359:76)

Thus it is probably a kha bug.

MathemanFlo avatar Apr 22 '22 17:04 MathemanFlo