Print Page | Close Window

Text corrupted when drawn vertically in tab

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=15979
Printed Date: 21 June 2025 at 5:04pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Text corrupted when drawn vertically in tab
Posted By: kyotocanuck
Subject: Text corrupted when drawn vertically in tab
Date Posted: 11 January 2010 at 2:29am
My current project has both English and Japanese resources and uses the CXTPDockingPaneManager to show several panels with Japanese titles. It all appears to work fine except when the panes are displayed as vertical tabs. In this case, the font used does not properly display Japanese text so I get gibberish.

I have traced the issue to CXTPDrawHelpers::GetVerticalFontName() returning "Arial" which on my PC and several others, does not properly display Japanese text. In CXTPTabPaintManager::SetFontIndirect() GetVerticalFontName is used and the face name changed from the default "Segoe UI" to Arial.

I would like to know a good way to work around this problem but none of these functions are virtual and I would like to avoid actually changing the codejock source if possible. I would like to set CXTPTabPaintManager::m_fntVerticalNormal to have the same face name as m_fntNormal. Is this possible?

(Using 13.2.0)



Replies:
Posted By: Oleg
Date Posted: 12 January 2010 at 1:14am
Hi,
 
Do you call SetFontIndirect manually ? / If not, try call it and set lfCharSet field manually to SHIFTJIS_CHARSET.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: kyotocanuck
Date Posted: 12 January 2010 at 1:49am
Thank you for the suggestion.
I have tried calling SetFontIndirect() via m_paneManager.GetPaintManager()->GetTabPaintManager()->SetFontIndirect() but unfortunately there is no effect. Good try though. I hadn't thought of that. I was trying to use this function to set the font and it does set the font as desired for horizontal display, but vertical uses CXTPDrawHelpers::GetVerticalFontName

I'm looking for some way around this to prevent the call the GetVerticalFontName. Disabling this call in the codejock source sets the font correctly and displays correctly but this function is not virtual and as I stated early, I'm trying to avoid changing the source if possible.

Do you have any other suggestions? Thanks again



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net