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 » Developing U++ » U++ Developers corner » CJK woes
Re: Howto export japanese word to pdf? [message #7764 is a reply to message #7743] Sat, 20 January 2007 16:41 Go to previous messageGo to previous message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
luzr wrote on Fri, 19 January 2007 00:50


OTHER means first index of font that is not "standard" Smile



I have modified the UWord source to add japanese font
Vector<int> ff;
ff.Add(Font::ARIAL);
ff.Add(Font::ROMAN);
ff.Add(Font::COURIER);
for(int i = Font::COURIER + 1; i < Font::GetFaceCount(); i++)
    if(i==81) //This is MS PMincho for my system
    {
	if(Font::GetFaceInfo(i) & Font::SCALEABLE &&
	   !(Font::GetFaceInfo(i) & Font::SYMBOLTYPE))
		ff.Add(i);
    }
editor.FontFaces(ff);

But the rendering result is ugly, next character overlapped with half of the previous character.
Then i changed DrawText.cpp, GetPage function.
ptr->GetMetrics(page, ptr->default_width); 
//ptr->GetMetrics(140, ptr->default_width);
/*for(int i = 0; i < 256; i++)
	if(ptr->default_width[i].width) {
		for(int j = 0; j < 256; j++)
		ptr->default_width[j] = ptr->default_width[i];
		break;
        }*/


I don`t know my changes will break everything, but the result is better.

Which line that do text drawing for richedit control?

BTW the pdf exporting still error.
It stopped at this line from TTFReader.cpp
if(head.magicNumber != 0x5F0F3CF5)
	Error();


Thanks
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Linear sorted array vs. tree
Next Topic: Welcome to Portland!
Goto Forum:
  


Current Time: Thu May 16 01:00:38 CEST 2024

Total time taken to generate the page: 0.13227 seconds