[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Width of Chinese Character in TortoiseMerge

From: Oto BREZINA <otik_at_printflow.eu>
Date: Sat, 02 Apr 2011 10:15:38 +0200

On 2011-04-02 09:17, Stefan Küng wrote:
> On 02.04.2011 00:53, Garfield Yao wrote:
>
>> The problem with those chars is that they don't have a fixed width,
>> they're wider than the other chars. TMerge depends on fixed width fonts
>> where all chars have the same width.
>> Changing that would require a major rewrite, and would also make TMerge
>> a *lot* slower than it is now.
>>
>> But the interesting thing is that EOL characters are showed in right
>> position.
> Yes, because that is drawn after the text is rendered. Rendering the
> text is done correctly and returns the position of where the rendering
> stopped, so that position is known.
>
> But rendering text is slow, and doing that every time we need a position
> of a char would be way too slow.
You need it only for some lines.
1. where is cursor - to place cursor on right place
2. where block start
3. where block end

In fact you don't need to render text char by char you just need to ask
where char ends. You you cut line after char you are interested in and
get rendered size. Then place cursor, block start/ end.
I mask some block using right/left arrows and shift and line fancy moved.
> Stefan
oto

-- 
Oto BREZINA, Printflow s.r.o., EU
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2716262
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-04-02 10:16:29 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.