OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 15-10-2009, 03:58
marvin
Guest
 
Posts: n/a
Question font change problem (otf-related?)

Hi all,

i have a problem with changing fonts (fontnames) by VBA scripts. (CorelDraw X4, WinXP)
The following works as expected:

Code:
 Dim d As Document
 Dim s As Shape
 Dim t As Text
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, "This is an example.", , , "LM Roman 8", 8)
 Set t = s.Text
But this does not assign the correct font to the created text, instead the default font is used:

Code:
Dim d As Document
 Dim s As Shape
 Dim t As Text
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphText(3, 3, 5, 5, "This is an example.")
 Set t = s.Text
 t.Story.Font = "LM Roman 8"
 t.Story.Size = 8
Both variants of the script work, as expected, with other fonts, e.g. "Times New Roman".

The Font "LM Roman 8" is an open type font (postscript outline, single master) and available here: http://www.gust.org.pl/projects/e-fo...odern/download.

Can you reproduce this? Is it a special problem connected with this kind of opentype font?

Best regards,
marvin

Last edited by marvin; 15-10-2009 at 04:00. Reason: added program version information
Reply With Quote
  #2  
Old 15-10-2009, 12:28
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Font

I can confirm it does not work with that font. I don't think it is an OpenType issue as I am using Windows 7 and almost all my fonts are OpenType and the code works fine. I just seems to be that series of fonts.

If I get a few more minutes, I will try and dig into it a little deeper.

-Shelby
Reply With Quote
  #3  
Old 17-10-2009, 09:53
marvin
Guest
 
Posts: n/a
Default

OK. I did some testing too.
No other Font on my sytem showed this problem.

marvin
Reply With Quote
  #4  
Old 19-10-2009, 17:49
runflacruiser's Avatar
runflacruiser runflacruiser is offline
Senior Member
 
Join Date: Jun 2009
Location: Pigeon Forge, TN USA
Posts: 811
Default

Hi Marvin.

Have you tried to recreate/regenerate the font (like with fontlab or something).


-John
Reply With Quote
  #5  
Old 20-10-2009, 05:49
marvin
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by runflacruiser View Post
Have you tried to recreate/regenerate the font (like with fontlab or something).
Recreating the opentype font didn't solve the problem. Conversion to TrueType apparently solves the problem but is not what I want.

However, in the meantime I figured out that the described problem does not exist in CorelDraw X3! Both code snippets work perfectly well in X3 on the same system.

I believe the creators of the Latin Modern OpenType fonts know exactly what they are doing. So the font handling in X4 seems to be faulty.

Moritz
Reply With Quote
Reply

Tags
corel, font names, opentype, vba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change font Manuel CorelDRAW/Corel DESIGNER VBA 5 16-07-2009 03:40
Change Font Newbie Help FilmLadd Macros/Add-ons 2 23-11-2008 17:52
Select specified text, change font size? fiddler2b CorelDRAW/Corel DESIGNER VBA 3 23-04-2006 08:11
Font Problem excessiveforce General 5 24-10-2005 21:14
Bitstream Font Nav Problem ddonnahoe General 0 16-12-2004 08:25


All times are GMT -5. The time now is 13:08.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com