Jump to content


Photo

Unicode Header -> wrong alignment


  • Please log in to reply
15 replies to this topic

#1 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 22 November 2007 - 12:42 PM

Hello Boki,

As you see in the demo project, there are nine NextGrids on a form. The first and the second group use Tahoma font and the third group uses Saysettha OT font.

Caption of the first group just uses normal English characters and it works perfect.

Caption of the second group uses Vietnamese characters. It is OK when left align but it looks a bit close to the right margin when center and goes wrong when right align.

Caption of the third group uses Lao characters. It is OK when left align but when center and right align, it comes closer to the left margin.

This bug seems has a relation with the bug is discussed in this topic:
http://www.bergsoft....?showtopic=1776

Kind regards,

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 23 November 2007 - 02:40 AM

Hello Sayxanath,

Thank you for reporting this problem. I will see what I can do, but I am affraid that it will not be easy. I think that for some reason TextWidth doesn't calculate width of unicode (Eastern fonts) strings correctly.

I will put this problem into my to-do list, but If you can go with some workarond this will be great because I am not sure how hard it will be to solve it sad.gif

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 23 November 2007 - 06:24 AM

Hello Boki,

TextWidth does not work correctly with Unicode data. You can replace it by WideCanvasTextWidth of TntGraphics unit. Please see the attachment.

Kind regards,

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 24 November 2007 - 09:43 PM

Hello Sayxanath,

I will try to use solution from this topic:
http://www.bergsoft....h...

I hope that it will work.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#5 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 25 November 2007 - 01:21 PM

Hello Sayxanath,

After you add new procedure from topic I have linked, you will be able to use GetTextWidth procedure.

Then, locate procedure TStyleDisplay.DrawHeaderContent in NxDisplays.pas and change line

CODE
    case Orientation of
      hoHorizontal: if DisplayMode <> dmImageOnly then CaptionWidth := TextWidth(Caption) + spTextToImageDist;


into

CODE
    case Orientation of
      hoHorizontal: if DisplayMode <> dmImageOnly then CaptionWidth := NxClasses.TextWidth(Canvas, Caption) + spTextToImageDist;


Now it seems to work fine.

I will re-upload files in next 60 minutes on Members Section and save you from manual patching.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 25 November 2007 - 03:09 PM

Hello,

I have re-upload zip archive on Members Section. Please tell me if it works now.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 27 November 2007 - 05:10 AM

Helo Boki,

I cannot find any attachment in my Member Section. Could you check it again?

Kind regards

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 27 November 2007 - 08:32 AM

Hello Sayxanath,

You probably may see a files after you click on downloads section in Members Section (http://bms.bergsoft.net/)

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 27 November 2007 - 06:31 PM

Hello Boki,

I have looked it again but I cannot see the download link. (I open my profile by click on the avatar in the left panel). I cannot enter this link - http://bms.bergsoft.net/ - since it requires a username and password but it does not accept my current name and password.

So if it is possible, could you please send it via e-mail: thangvq at gmail dot com.

Kind regards

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 27 November 2007 - 06:53 PM

Hello Sayxanath,

Please note that user name from Members Section is different from user name and password from forum.

Can you please tell your original email used in registration process to I locate your account on Members Section and send you back your User Name and password.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 28 November 2007 - 05:25 AM

Hello Boki,

My original e-mail that I used for registration this forum account is thangvq at gmail dot com. I don't have account on http://bms.bergsoft.net/

Kind regards

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 28 November 2007 - 08:44 AM

Hello Sayxanath,

Can you please tell me do you maybe have registered (ordered) components or you are using free version? Account on Members Section is automatically created after ordering components.

I didn't update free version yet, but if you are using free version I may do this now.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 28 November 2007 - 11:28 AM

Hello Boki,

I am using a free version. Thank you for your kindness.

Kind regards

#14 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 28 November 2007 - 03:50 PM

Hello Sayxanath,

I will update free version too, in next 60 minutes.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#15 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,195 posts
  • Gender:Male

Posted 28 November 2007 - 06:44 PM

Hello Sayxanath,

Please look in attach for new release of NextGrid free:
Attached File  nextgrid_d7.zip   1.14MB   3 downloads

Please tell me if this bugs are done now.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#16 Vu Quang Thang

Vu Quang Thang
  • Members
  • 91 posts

Posted 29 November 2007 - 02:11 PM

Hello Boki,

It works perfectly for both alignment and footer format mask issue.

Kind regards

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users