Re: display unicode string one character at a time, actually quite simple after all
Re: display unicode string one character at a time, actually quite simple after all
- Subject: Re: display unicode string one character at a time, actually quite simple after all
- From: mathew davis <email@hidden>
- Date: Thu, 19 Feb 2009 01:32:37 +1100
Do you have an example where the result of
rangeOfComposedCharacterSequenceAtIndex is too wide?
um guess I was just plain wrong
Thank you Gerriet,
I'm actually not sure how I got that so wrong,
I've just run my code again and it's doing exactly what I want it to
I must have had a bug earlier today that just wasn't splitting strings
at all.
thank you very much for taking the time to look at this for me and to
write back.
I was absolutely convinced that
rangeOfComposedCharacterSequenceAtIndex wasn't working the way I wanted.
regards Mathew
On 18/02/2009, at 10:02 PM, Gerriet M. Denkmann wrote:
On 18 Feb 2009, at 14:18, mathew davis <email@hidden>
wrote:
ideally I'd like to break the string in to:
the smallest possible segments which do not need to horizontally
overlap when displayed in order to make sense to a reader.
so the composed character sequence:
g̈
U+0067 ( g ) latin small letter g
U+0308 ( ̈ ) combining diaeresis
would need to be one substring because the glyphs overlap
horizontally
rangeOfComposedCharacterSequenceAtIndex sees this as one composed
character. Just like you require.
the composed character sequence in Thai:
เก
(adj. mischievous)
U+0E40 ( เ ) thai character sara e
U+0E01 ( ก ) thai character ko kai
would ideally be broken into two substrings
rangeOfComposedCharacterSequenceAtIndex sees this as two composed
characters.
ฺีBut why do you call it a composed character sequence? It is
just a vowel + consonant.
but:
กึ
would have to be one substring
rangeOfComposedCharacterSequenceAtIndex sees this as one composed
character.
In Thai you can get composed character sequences that look a bit like
เกอะ
I do not think that this is a composed character. "เถอะ"
which looks similar (but is a real word) is broken into 4 chars
(just as you want it) by rangeOfComposedCharacterSequenceAtIndex.
At the moment i'm using rangeOfComposedCharacterSequenceAtIndex.
And if a sequence is too wide for my tile I scale it down.
Do you have an example where the result of
rangeOfComposedCharacterSequenceAtIndex is too wide?
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden