473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Writing font details to a txt file

Lee
Hi,

How do you write out a Font's details to a txt file? So you can eventually
read it back in a select the font!

thanks in advance
Mar 24 '06 #1
6 1699
Lee
Also how do you get the default system?

thanks
"Lee" <le*****@hotmail.com> wrote in message
news:uN****************@TK2MSFTNGP12.phx.gbl...
Hi,

How do you write out a Font's details to a txt file? So you can
eventually read it back in a select the font!

thanks in advance

Mar 24 '06 #2
Lee
Also how do you get the default system font?

thanks
"Lee" <le*****@hotmail.com> wrote in message
news:uN****************@TK2MSFTNGP12.phx.gbl...
Hi,

How do you write out a Font's details to a txt file? So you can
eventually read it back in a select the font!

thanks in advance


Mar 24 '06 #3
General you don't have a system default font, but in general the default is
times new roman. Event for default web pages.

What do you mean by write font details to a text file? Where are you
getting the details from?

Please be more specific.
Mar 24 '06 #4
Lee
I have sorted the font saving thing.... thanks,

times new roman? I am creating an app that loads and saves the currently
used font, but... when first run on a system it will have to get a font from
somewhere! using times new roman is fine, but what happens if some idiot
deletes that font from their system, and then my app tries to load it? I
had assumed that there may be a default system font!

thanks again
"jeff" <yu****@yup.com> wrote in message
news:0c******************************@ureader.com. ..
General you don't have a system default font, but in general the default
is
times new roman. Event for default web pages.

What do you mean by write font details to a text file? Where are you
getting the details from?

Please be more specific.

Mar 24 '06 #5
Lee wrote:
I am creating an app that loads and saves the currently used
font, but... when first run on a system it will have to get a font
from somewhere! using times new roman is fine, but what
happens if some idiot deletes that font from their system,
and then my app tries to load it?
Well, it won't work. Try not to rely on fonts. They're changeable. The
user is certainly not an "idiot" for adding or removing fonts. It's
more idiotic for a program to complain and fail if it can't find a
font. It's only text, after all.
I had assumed that there may be a default system font!


You can use "MS Shell Dlg" to get the default Windows font used for
user interface controls, but it's not a real font, just a "pointer" to
the one that is being used on that system.

Eq.
Mar 24 '06 #6
Lee <le*****@hotmail.com> wrote:
I have sorted the font saving thing.... thanks,

times new roman? I am creating an app that loads and saves the currently
used font, but... when first run on a system it will have to get a font from
somewhere! using times new roman is fine, but what happens if some idiot
deletes that font from their system, and then my app tries to load it? I
had assumed that there may be a default system font!


Have a look at SystemFonts.DefaultFont.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 25 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Mark Sargent | last post by:
Hi All, been away from developing, if you can call what I do that, and am stumped already..lol..see code below. I'm trying to get each row to display, based on the if statements. Hope you can...
0
by: hesing Qiang | last post by:
In Print Process,I use the code,but it is not run correctly On WINDOWS 98 . I didn't know why ...? this.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular,...
3
by: VMI | last post by:
I'm having trouble writing several records from an XML file into an html file. The problem is that it only outputs one record to the html file. I need to export all the records in the xml file to...
5
by: tshad | last post by:
How can I set the size of text in the dropdown list: <asp:DropDownList ID="ddlQuestionType" runat="server"> <asp:ListItem Value="MS" Text="Multiple Single" /> <asp:ListItem Value="MM"...
12
by: jcrouse | last post by:
I am using the following code to write to an XML file myXmlTextWriter.Formatting = System.Xml.Formatting.Indente myXmlTextWriter.WriteStartElement("CPViewer"...
2
by: Tony | last post by:
Yes, I need to specify a font type so that the characters will be evenly spaced when I write to a tab delimited text file. So how does one specify a font type to write/print and which font is...
19
by: Noozer | last post by:
I need to keep my application settings in a file that users can copy/backup/etc. Before I start using the old INI file standard, is there any easy way to use XML files to hold application...
6
by: BobAchgill | last post by:
Has anyone had success with writing text using a private font that was not already installed to the system? When I try the example code in NET Framework Developer's Guide called “Creating a...
2
by: ThatsIT.net.au | last post by:
I have this code that writes a pie chart in a asp.net page, but I want to use it in a server control. When I try I get a error on the last line "Response.OutputStream" Obviously there is no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.