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

Re: If the font name in non-ascii, encoding mismatch

From: <kosuebi22_at_yahoo.co.jp>
Date: Sun, 4 Jan 2015 23:46:04 +0900 (JST)

On 2014/12/31, Wed 03:55, Stefan Küng wrote;
> On 30.12.2014 17:21, kosuebi22_at_yahoo.co.jp wrote:
>>  Date: 2014/12/29, Mon 23:51, Stefan Küng wrote:
>>>  On 28.12.2014 14:14, kosuebi22_at_yahoo.co.jp wrote:
>> 
>>>>   I find a mismatch of encoding of the font name.
>> 
>>>>  (snip.)
>>>  Could you maybe send the patch for Scintilla to the Scintilla dev group
>>>  here:
>>>  https://groups.google.com/forum/#!forum/scintilla-interest
>>  Thanks for the advice.
>>  But I think it is no good to change official Scintilla API.
>>  Has a problem in another program's compatibility.
>>  Or, It it difficult to add new Scintilla API by me...
>> 
>>  Alternative plan.
>>  I create new patch.
>>  I don't change Scintilla.
>>  DirectWrite mode set UTF-8.GDI mode set ANSI.
>>  I compile/test on Windows 7(jp) and Visual Studio Community 2013.
>>  There is limitation to the GDI mode. Font name is only in CP_ACP charctor.
>>  (same as until now)

> Since DirectWrite mode is the default now, I think this is the best
> solution.
me too. best solution.

>>  This patch is difficult back port than the previous patch.
>> 
>>  There is need to change "..\UDiffFontName" and Direct2D 
> default to FALSE.

> Don't understand: why do you want to set Direct2D by default to FALSE?
> And what change is required for UDiffFontName?
It is that if you want to back-port to 1.8.x.
marge conflicts:
  r26087 D2D default
  r25977 new setting page for the TortoiseUDiff...

> But before we go any further here:

> I think the real question is: why is the localized font name not
> recognized by CreateFontIndirectA ? I mean, the font name is converted
> from utf16 to ansi (local code page). And the local code page should be
> able to correctly handle that font name?
My PC case,
TortoiseSVN fonts setting are list of 53 items.
(1) 30 fonts: English(ASCII) name by Japanese/English system locale.
(2) 21 fonts: Japanese name by Japanese system locale.
  and alternative English name by English system locale.
(3)  2 fonts: Japanese name by Japanese/English system locale.

(1) or (2) are OK by CreateFontIndirectA.
(3) converted font name to "????"... at utf16 to ansi(Latin1) NG.
If utf16 to ansi(Japanese/Shift_JIS) OK.
CreateFontIndirectA is not a perfect.

but (3) are miner fonts.

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3093695

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-01-04 15:56:25 CET

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

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