Skip Menu |

This queue is for tickets about the Wx CPAN distribution.

Report information
The Basics
Id: 119022
Status: resolved
Priority: 0/
Queue: Wx

People
Owner: Nobody in particular
Requestors: prbrenan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: DrawText of unicode string
As can be seen in the attached screen shot, the DrawText of "Hello" works as expected but not "𝝰𝝱𝝲𝝱𝝰". my $f = Wx::Font->new("Noto Mono 24"); my $g = Wx::PaintDC->new($panel); $g->SetFont($font); $g->DrawText("Hello", 400, 400); $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450); I have tried various fonts (including the default) as well as various encodings all with similar (or worse) results. uname -a 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux perl -v v5.22.1 Thanks for your help!
Subject: wx2.png
Download wx2.png
image/png 4.3k
wx2.png
CC: bug-Wx [...] rt.cpan.org
Subject: Re: [rt.cpan.org #119022] DrawText of unicode string
Date: Mon, 28 Nov 2016 22:30:49 +0100
To: wxperl-users [...] perl.org
From: Johan Vromans <jvromans [...] squirrel.nl>
On Mon, 28 Nov 2016 15:41:01 -0500, "Philip R Brenan via RT" <bug-Wx@rt.cpan.org> wrote: Show quoted text
> my $f = Wx::Font->new("Noto Mono 24"); > my $g = Wx::PaintDC->new($panel); > $g->SetFont($font); > $g->DrawText("Hello", 400, 400); > $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450);
You did 'use utf8', I assume? -- Johan
Encoding the string as utf8 does not seem to improve the situation as can be seen at line 3 in the following code and the corresponding line 3 of the attached screen shot: $g->DrawText("Hello", 400, 400); $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450); $g->DrawText(encode('UTF-8', "𝝰𝝱𝝲𝝱𝝰"), 400, 500); On Mon Nov 28 16:31:07 2016, jvromans@squirrel.nl wrote: Show quoted text
> On Mon, 28 Nov 2016 15:41:01 -0500, "Philip R Brenan via RT" > <bug-Wx@rt.cpan.org> wrote: >
> > my $f = Wx::Font->new("Noto Mono 24"); > > my $g = Wx::PaintDC->new($panel); > > $g->SetFont($font); > > $g->DrawText("Hello", 400, 400); > > $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450);
> > You did 'use utf8', I assume? > > -- Johan
Subject: wx1.png
Download wx1.png
image/png 8k
wx1.png
CC: bug-Wx [...] rt.cpan.org
Subject: Re: [rt.cpan.org #119022] DrawText of unicode string
Date: Tue, 29 Nov 2016 08:37:50 +0100
To: wxperl-users [...] perl.org
From: Johan Vromans <jvromans [...] squirrel.nl>
On Mon, 28 Nov 2016 17:49:14 -0500, "Philip R Brenan via RT" <bug-Wx@rt.cpan.org> wrote: Show quoted text
> Mon Nov 28 17:49:13 2016: Request 119022 was acted upon. > Transaction: Correspondence added by PRBRENAN > Queue: Wx > Subject: DrawText of unicode string > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: prbrenan@cpan.org > Status: open > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=119022 > > > > Encoding the string as utf8
You didn't answer my question.
Success! Thanks! use utf8; $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450); produces the attached. On Mon Nov 28 15:41:00 2016, PRBRENAN wrote: Show quoted text
> As can be seen in the attached screen shot, the DrawText of "Hello" > works as expected but not "𝝰𝝱𝝲𝝱𝝰". > > my $f = Wx::Font->new("Noto Mono 24"); > my $g = Wx::PaintDC->new($panel); > $g->SetFont($font); > $g->DrawText("Hello", 400, 400); > $g->DrawText("𝝰𝝱𝝲𝝱𝝰", 400, 450); > > I have tried various fonts (including the default) as well as various > encodings all with similar (or worse) results. > > uname -a > 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 > x86_64 x86_64 GNU/Linux > perl -v > v5.22.1 > > Thanks for your help!
Subject: wx3.png
Download wx3.png
image/png 3k
wx3.png