> I only tested on XP with the Musica font installed, and I can 
> see something
> similar to what you described. On the second line I see:
> 
> ":X XX XX XX XX:X"
> 
> where "X" means a glyph replacement box (with a question mark 
> inside), and
> there *seem* to be spaces after #1, #3, #5, and #7, but the 
> trailing colon (":")
> appears /between/ glyph replacement box #9 and #10.

Yes - this is an effect produced by the (historical) way that the win32 
::draw() method works - it draws each "character" one-by-one, then increments 
the x-coordinate by the width of the glyph.

Now, with my recent changes, draw() at least sees the surrogate pairs, but 
fails to render them correctly on XP, so the 5 surrogate-pair glyphs produce 10 
replacement boxes on the screen.

But, width() does not even handle the surrogate pairs right, so it increments 
the x-coordinate by only the width of the glyph that corresponds to the lower 
16-bits of the full UCS code point... This last bug is present in all winXX 
variants, we need to fix the width() method to handle surrogate pairs.

The output should look like  ":X X X X X:" if it "worked".

Note that the ::draw(angle, str...) method renders the full string in one go, 
not glyph-by-glyph, so the failure measuring the width does not apply.

On XP, it displays ":XX XX XX XX XX:" which is "less wrong", though still not 
correct - you can test this by tweaking the rotated_text.cxx test, which uses 
both the ::draw(angle, str...) method and the "plain" ::draw(str...) method.


> BTW: I can see both +/- characters ("±") on line #1, as expected.

Yup - leftovers from checking that errors-to-8859-1 worked...


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to