473,766 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About creating a font using a path in the facename.

26 New Member
Hey there,

I'm just wondering if it is possible to specify a path to a font, as opposed to just the font name itself.

For example:

Expand|Select|Wrap|Line Numbers
  1.  
  2.     m_FontDesc.Height             = _iHeight;
  3.     m_FontDesc.Width             = _iWidth;
  4.     m_FontDesc.Weight             = _iWeight;
  5.     m_FontDesc.MipLevels         = _iMipLevels;
  6.     m_FontDesc.Italic             = _bItalic;
  7.     m_FontDesc.CharSet             = 0;
  8.     m_FontDesc.PitchAndFamily    = 0;
  9.     m_FontDesc.Quality             = 0;
  10.     m_FontDesc.OutputPrecision   = 0;
  11.  
  12.     wcscpy_s(m_FontDesc.FaceName, "/Fonts/Showcard Gothic");
  13.  
instead of this

Expand|Select|Wrap|Line Numbers
  1.  
  2.     m_FontDesc.Height             = _iHeight;
  3.     m_FontDesc.Width             = _iWidth;
  4.     m_FontDesc.Weight             = _iWeight;
  5.     m_FontDesc.MipLevels         = _iMipLevels;
  6.     m_FontDesc.Italic             = _bItalic;
  7.     m_FontDesc.CharSet             = 0;
  8.     m_FontDesc.PitchAndFamily    = 0;
  9.     m_FontDesc.Quality             = 0;
  10.     m_FontDesc.OutputPrecision   = 0;
  11.  
  12.     wcscpy_s(m_FontDesc.FaceName, "Showcard Gothic");
  13.  
  14.  
This post was taken from another site. It frames my needs exactly, so I pilfered it.

And ideas on how to do this?

Thank you for your time :)
Nov 30 '09 #1
0 1214

Sign in to post your reply or Sign up for a free account.

Similar topics

5
2376
by: K | last post by:
I have found a script online that I want to use (I am new to PHP). It creates dynamic images based on the text that you pass it. However, no matter how I try, I can't get anything other than a blank white image. Can one of you knowledgeable people please have a look at the code below and help please.
7
1694
by: Derrick | last post by:
Can anyone tell me how to persist and retrieve the font characteristics that a user chooses to have displayed in a personalized label field on the front of their application? I wanted to be able to give the user this ability so that they could place a company logo, motto, or simply a message of the day on the form, and have it redisplay from then on at start up just as it was to begin with. I was trying to use an .rtf file to store the...
4
2972
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text email by creating a text file, with content following certain format, and saving that file into the correct '..\mailroot\pickup' folder, and it is working fine
12
4169
by: enak | last post by:
I have found some code that shows how to convert an html form to Word. The message said to simply put the following in the Page_load: Response.ContentType = "application/ms-word" Response.AddHeader("content-disposition", "inline; filename=BP_CaseStatus.doc") Now all I should have to do is create the page just like I would if I were going to display it in the browser.
1
2177
by: kurt sune | last post by:
I am trying to do a rotated font. I get a handle alright which I convert to a font-object by Font2 = Font.FromHfont(handleFont) g.DrawString(Text-to draw, Font2, Brush, CurrentX, CurrentY) However the font doesnt get rotated. Anybody any tips? /k
14
1419
by: UJ | last post by:
What's the easiest way (without setting up a style sheet) to set the font for an area of text. I need to be able to specify the exact font and font size - not the 1-7 numbers IE uses. I want to be able to set some text to be Font=Arial, Size=12pt. TIA - Jeffrey.
4
2756
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. It should put a blue and yellow box on the page with "This is a test" as part of the picture. But what I get is a broken Gif. The other problem is that I can't view the source???? The view source is disabled for this page. What causes this?
0
7805
by: PracticalApps | last post by:
I looked to find a canned solution to create a Word document in my application and just couldn't find anything that just gets to the point. I would think, and I may be making too strong of an assumption here, that anyone looking for this kind of solution would just want a simple example that they can work from and expand upon. In my case, I just want to output a new Word document. I found that creating a simple wrapper class would make this...
16
8648
by: Laszlo Nagy | last post by:
I need to create multi lingual invoices from reportlab. I think it is possible to use UTF 8 strings but there is a problem with the font. I could not find any free TTF font that can do latin1, latin2, arabic, chinese and other languages at the same time. Is there a single font that is able to handle these languages? (Most of our invoices will be for EN, FR, DE, HU, SK, CZ, RO but some of them needs to be in Chinese.) Thanks, Laszlo
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9837
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.