Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » About Chinese font display solutions
About Chinese font display solutions [message #57516] Thu, 16 September 2021 08:56 Go to next message
lzjaiwl is currently offline  lzjaiwl
Messages: 1
Registered: September 2021
Junior Member
Chinese fonts cannot be drawn correctly under Win32 system. Please modify the following files:
FontWin32.cpp
function:
static int CALLBACK Win32_AddFace(const LOGFONT *logfont, const TEXTMETRIC *, dword type, LPARAM param)

int q = sList->Find(name);
FaceInfo& f = q < 0 ? sList->Add(logfont->lfFaceName) : (*sList)[q];
f.name = FromSystemCharset(logfont->lfFaceName);

f.name = FromSystemCharset(logfont->lfFaceName);
------------------------Change to:--------------------------
f.name = logfont->lfFaceName;
Re: About Chinese font display solutions [message #57518 is a reply to message #57516] Thu, 16 September 2021 10:09 Go to previous message
mirek is currently offline  mirek
Messages: 13639
Registered: November 2005
Ultimate Member
lzjaiwl wrote on Thu, 16 September 2021 08:56
Chinese fonts cannot be drawn correctly under Win32 system. Please modify the following files:
FontWin32.cpp
function:
static int CALLBACK Win32_AddFace(const LOGFONT *logfont, const TEXTMETRIC *, dword type, LPARAM param)

int q = sList->Find(name);
FaceInfo& f = q < 0 ? sList->Add(logfont->lfFaceName) : (*sList)[q];
f.name = FromSystemCharset(logfont->lfFaceName);

f.name = FromSystemCharset(logfont->lfFaceName);
------------------------Change to:--------------------------
f.name = logfont->lfFaceName;


This is genuine bug, but I think we need more elaborate fix, basically change all font handling routines to UNICODE variants. I did just that:

https://github.com/ultimatepp/ultimatepp/commit/88d871be7153 e28a4ac7f4606e9a29047d7c6ece

can you please check it works for you?

Mirek
Previous Topic: [BUG] Translatable menu text of accelerator keys contains invalid characters.
Goto Forum:
  


Current Time: Wed Jun 29 06:33:54 CEST 2022

Total time taken to generate the page: 0.01698 seconds