Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: NormalFont_GetTextSize blank BUG  (Read 402 times)
lovetv3d
Community Member
*
Posts: 100


« on: June 15, 2008, 06:41:33 AM »

Code:
d2DText.NormalFont_GetTextSize "        ", d2DText.NormalFont_GetFontByName("V13"), lWidth, 0&
lWidth=0

and NormalFont_GetTextSizeUnicode
Logged

Sorry for poor English
jviper
Community Member
*
Posts: 1382

Discipline in training


« Reply #1 on: June 16, 2008, 12:30:04 PM »

Try a atring that has text.
Logged

JAbstract.....Don't just imagine, make it happen!
SylvainTV
Administrator
Community Member
*****
Posts: 4479


WWW
« Reply #2 on: June 21, 2008, 11:21:28 AM »

That's unfortunately how NormalFont works, it uses D3DXFont internally ( a DX thing ), so it cannot be changed.

If you use TextureFonts ( native font renderer from TV ) then it should handle spaces correctly.
Logged

Regards

Sylvain Dupont
TrueVision3D Developer
sylvain@truevision3d.com

TV3D IRC at http://chat.truevision3d.com or on server irc.truevision3d.com #Truevision3D. Come talk with us !
Lenn
Customers
Community Member
*****
Posts: 454

Ivan Miskelic


« Reply #3 on: June 23, 2008, 11:25:23 AM »

or you could calculate spaces:

pseudocode:

width1 = getwidth("aaa")
width2 = getwidth("a a a")
spacewidth = (width2 - width1) / 2

i used dx fonts from the dx sdk. had the same problem. Smiley
Logged

lovetv3d
Community Member
*
Posts: 100


« Reply #4 on: June 26, 2008, 03:36:35 AM »

YES,Thank you!
Logged

Sorry for poor English
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks