|
-
Jan 9th, 2007, 02:21 PM
#1
Thread Starter
Addicted Member
fonts appearing differently on different machine
i have 2 issues with fonts..
- on my computer, the text are all ok but on another computer.. there are some characters that are replaced by symbols... like the ("\" replaced by a currency symbol)
- on my computer, the text size is ok ,on another computer, the text are larger and doesn't even fit in a command button.... (probably system font size or resolution-related)..
my question
any solution? lol
-
Jan 9th, 2007, 02:25 PM
#2
Re: fonts appearing differently on different machine
Sounds as if you're using a font that's not installed on the other computer (or not installed on your computer). If a font isn't installed, Windows will use another font in that font family.
Resolution: Install the missing font on the computer that's missing it.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Jan 9th, 2007, 04:16 PM
#3
Thread Starter
Addicted Member
Re: fonts appearing differently on different machine
how can i detect if font is missing on the other computer in my application??
-
Jan 9th, 2007, 04:22 PM
#4
Re: fonts appearing differently on different machine
All fonts are installed in %windir%\fonts, or C:\Windows\Fonts.
I think there is an API to get that specific folder. If not, you can use the GetWindowsDirectory() API function and then append \fonts to it.
Then you can check if the file exists.
Alternatively, you can check them like this:
VB Code:
Private Function FontExists(ByVal FontName As String) As Boolean
Dim strCName As String, intLoop As Integer
strCName = LCase$(FontName)
For intLoop = 0 To Screen.FontCount - 1
If LCase$(Screen.Fonts(intLoop)) = strCName Then
FontExists = True
Exit For
End If
Next intLoop
End Function
Private Sub Form_Load()
'Test function.
MsgBox FontExists("tahoma"), , "TRUE"
MsgBox FontExists("fjlskdfj"), , "FALSE"
End Sub
-
Jan 9th, 2007, 04:37 PM
#5
Thread Starter
Addicted Member
Re: fonts appearing differently on different machine
thanks how can i set a font to all the textboxes/listboxes in my app???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|