Guest -OniKaze- Posted February 26, 2007 Posted February 26, 2007 Hello every1! my problem is quite simple i guess...but i don't know how to solve it..=D i'm trying to add a windows font, in my case Arial, in vb .net 'cause it doesn't come with it, but i don't know how!!! Can any1 PLEAAAASE help me??? Tnx!! Quote
Leaders snarfblam Posted February 26, 2007 Leaders Posted February 26, 2007 I can't image what computer would not come packed with Arial... regardless, you can include the font file as an embedded resource and either load it into your application (I think you can only use it for GDI+ in this case, not for fonts on controls) or you can install it into Windows (I don't know the specifics of this). However, there is still the issue of licensing. If you are not licensed to distribute this font then it may be technically illegal for you to do so. Quote [sIGPIC]e[/sIGPIC]
Guest -OniKaze- Posted February 27, 2007 Posted February 27, 2007 I can't image what computer would not come packed with Arial... regardless, you can include the font file as an embedded resource and either load it into your application (I think you can only use it for GDI+ in this case, not for fonts on controls) or you can install it into Windows (I don't know the specifics of this). However, there is still the issue of licensing. If you are not licensed to distribute this font then it may be technically illegal for you to do so. LOL...the computer has Arial...what doesn't have is VB .NET! i'm trying this approach: imports system.drawing.text Dim bfBOLD, bfBOLD2, Arial As BaseFont Dim black As color Dim myfont As New Font(Arial, 10, FontStyle.Bold, black) but now i'm with a new problem, when i try to use the variables bfBOLD n bfBOLD2 to use my font to print ina pdf doc, VB is not leting my use "myfont" cause "myfont" is not a member of com.lowagie.text.pdf.BaseFont. please help! xD tnx Quote
Guest -OniKaze- Posted February 27, 2007 Posted February 27, 2007 no more help needed yall!!! i've just figured how to solve my issue! the code is: dim variable as BaseFont variable = BaseFont.createFont("c:\windows\fonts\fontname.TTF", BaseFont.CP1252, BaseFont.NOT_EMBEDDED) and tcharam, done! and works just fine XD tnx for all the help!! Quote
MrPaul Posted March 1, 2007 Posted March 1, 2007 Java in VB.Net? com.lowagie.text.pdf.BaseFont is a Java class. Out of curiosity, how have you managed to use Java classes in VB.Net? :eek: Quote Never trouble another for what you can do for yourself.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.