Skip to content

[bug] fillText failed with non usual latin symbols #30

@shevernitskiy

Description

@shevernitskiy

I trying to draw text with cyrillic chars and got error.

ctx.font = '20px "Consolas"';
ctx.fillText("Ё", 50, 50);
error: Uncaught (in promise) Error: failed to fill text
      throw new Error("failed to fill text");
            ^
    at CanvasRenderingContext2D.fillText (https://deno.land/x/[email protected]/src/context2d.ts:296:13)
    at drawChar (file:///E:/programming/ts/charmap/src/main.ts:51:7)
    at file:///E:/programming/ts/charmap/src/main.ts:59:7
    at Array.forEach (<anonymous>)
    at file:///E:/programming/ts/charmap/src/main.ts:58:9
    at Array.forEach (<anonymous>)
    at drawMatrix (file:///E:/programming/ts/charmap/src/main.ts:57:10)
    at file:///E:/programming/ts/charmap/src/main.ts:37:1

I checked on other unicode symbols and seems like it only work with main EN ASCII table.
Using unicode hexcodes \u0090 also gives error.
It there any way to solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions