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
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.
Re: fonts appearing differently on different machine
how can i detect if font is missing on the other computer in my application??
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
Re: fonts appearing differently on different machine
thanks how can i set a font to all the textboxes/listboxes in my app???