473,385 Members | 1,834 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,385 software developers and data experts.

font list problem

Ciary
247 Expert 100+
hi all,

i have a problem with a webservice written in VB.NET. my intensions are to display a fontlist in a website. since the code i found only works in IE (look in HTML forum for the script) i was thinking of a webservice (since i already worked with this. look in PHP forum for more details).
while coding i got this code:
Expand|Select|Wrap|Line Numbers
  1.     Public Function getFonts() As String Implements IService1.getFonts
  2.         Dim strFont As String = ""
  3.         Dim fonts As New InstalledFontCollection
  4.         Dim families() As FontFamily = fonts.Families()
  5.         Dim i As Integer = 0
  6.  
  7.         For Each nfont As FontFamily In families
  8.             i = i + 1
  9.             strFont &= i.ToString & ") " & nfont.Name & vbNewLine
  10.         Next nfont
  11.  
  12.         Return strFont
  13.     End Function
  14.  
problem is: my IE page returns 189 fonts and my webservice only shows 163. does anyone know where my other 26 fonts go? (i'm currently working on the server so it should be the same amount.)
Apr 22 '09 #1
6 1608
MrMancunian
569 Expert 512MB
Perhaps there are some fonts that belong to the same family? Did you check which fonts don't show and what the relation between those fonts are?

Steven
Apr 22 '09 #2
Ciary
247 Expert 100+
@MrMancunian
i thought that too, at first. but when i listed fonts instead of families i get the same amount. the only relationship i can find between the fonts is that they dont show in ms office either. maybe microsoft uses the same technique.
Apr 22 '09 #3
MrMancunian
569 Expert 512MB
This might be a long shot, but MS Word only shows the fonts that the current default printer supports. Perhaps this is something to look into...

Steven
Apr 23 '09 #4
Ciary
247 Expert 100+
i guess vb.net also gets the printer fonts :) i just found 4 more fonts after restarting my server. fonts i just installed and already saw in my IE page (with a code in which i'm doing the same but it only works in IE)
Apr 23 '09 #5
Ciary
247 Expert 100+
i just found the reason why it doesn't find a few fonts. vb.net will only read the .ttf fonts. while some fonts are stored in .fon files. i dont know how to solve this though. also, vb.net will only find all fonts if you restarted your system when you installed a new font, although you can already use it in other windows apps.
Apr 23 '09 #6
manhit
1
thanks guys

hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
May 8 '09 #7

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

Similar topics

9
by: Zenobia | last post by:
Is there a problem with the CSS font-family property with IE6 - or is it my understanding of the font-family property? I was under the impression that the browser tried to use the first font. If...
115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
21
by: James Moe | last post by:
Hello, I just joined this group and saw the discussion "What do you think of resizing 1em to 10px?" I am somewhat confused by what y'all think should be used as a reference size. I was surprised...
10
by: Richard R Plourde | last post by:
I've got a problem that IE doesn't seem to use the entire font unicode subgroups from a hinted font file. When I display the following web page in IE 6 as opposed to Firefox 1.0 PR. Check out...
3
by: Charlie Peppler | last post by:
I've just installed a new OpenType font (http://www.typography.net/type/bliss.htm) on a WindowsXP Pro box. The font is useable in Office 2003 apps, no problem. However, when I open up VS2003,...
16
by: maya | last post by:
I have heard so much preaching here about how font sizes should be set as percentages so users can change font-sizes on their browsers... ok, so now at work am working on a site where we need to do...
4
by: shapper | last post by:
Hello, I have been reading a few articles about font sizing and I get various versions. All them say to use em ... ok that is what I use. But then they differ on the text size "initialization"....
14
by: Roedy Green | last post by:
Is there a shortcut way to define the default font family (and characteristics) to be applied to all styles? -- Roedy Green Canadian Mind Products The Java Glossary http://mindprod.com
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.