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 #7769 is a reply to message #7767] Sun, 21 January 2007 14:54 Go to previous messageGo to next message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
index.php?t=getfile&id=438&private=0
luzr wrote on Sun, 21 January 2007 20:24

gound -> found (typo) Smile

In fact, what I am asking for is to replace 140 with page, but leave the loop there.

The purpose of the loop is to avoid any zero width in the array. Zero width means missing glyph.

What we really are trying to do here is to save memory for monospaced CJK glyphs. We need an array with all values equal to CJK "mono" width. Then we can check for CJK chars whether all characters have the same width (or zero for missing chars) and in that case we can avoid using separate array for the "page" and use single shared array with default widths.

Mirek


I replaced the 140 with 'page', and test with loop and no loop.
Here i attached the image.
On the left is with loop, and the right is without loop.
I think the right is better, but may be just coincidence.
  • Attachment: result.PNG
    (Size: 1.40KB, Downloaded 523 times)
Re: Howto export japanese word to pdf? [message #7775 is a reply to message #7769] Mon, 22 January 2007 00:21 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ops, found a bug causing CJK character widths to misbehave:

Draw.h, 227:

	struct CharMetrics {
		int  width;
		int  lspc;
		int  rspc;

		bool operator==(const CharMetrics& b) const
		     { return width == b.width && lspc == b.lspc && rspc == b.rspc; }
	};



In GetPage, I have used 'page' instead of 140, that is better too.

Please test!

Which leaves us still with two problems: PDF and IME....

Moving this thread to "development area" now...

Mirek
Re: Howto export japanese word to pdf? [message #7776 is a reply to message #7775] Mon, 22 January 2007 00:48 Go to previous message
mobilehunter is currently offline  mobilehunter
Messages: 87
Registered: November 2006
Member
Tested, and it looks better now Smile
Thanks
Previous Topic: Linear sorted array vs. tree
Next Topic: Welcome to Portland!
Goto Forum:
  


Current Time: Fri Apr 26 19:44:12 CEST 2024

Total time taken to generate the page: 0.03849 seconds