ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Monowidth font (https://www.excelbanter.com/excel-programming/427306-monowidth-font.html)

Brettjg

Monowidth font
 
Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett

Gary''s Student

Monowidth font
 
Search for "non-proportional font"
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett


Brettjg

Monowidth font
 
Thanks GS, as ever. I'll try Lucida console, but there sure don't seem to be
many around. Regards, Brett

"Gary''s Student" wrote:

Search for "non-proportional font"
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett


Gary''s Student

Monowidth font
 
I agree. If someone develops a non-proportional form of Verdana, I'd buy it.
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Thanks GS, as ever. I'll try Lucida console, but there sure don't seem to be
many around. Regards, Brett

"Gary''s Student" wrote:

Search for "non-proportional font"
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett


Brettjg

Monowidth font
 
I was just saying to my partner (a graphic designer on Macs) that it staggers
me that with our ridiculously powerful PCs and Macs, we can't just convert
ANY font to monospace. I mean for crying out loud, all that has to be done is
create every character with the same amount of ems. That's got to be all of
30 or 40 lines of VB code. Anyway, we're stuck with it - unless you want to
create those 30 or 40 lines. Come on, don't be weak.

I too was a big fan of Verdana fo quite a while until I discivered the very
elegant cousin Tahoma. She's a little slimmer, you see. Regards, Brett.

"Gary''s Student" wrote:

I agree. If someone develops a non-proportional form of Verdana, I'd buy it.
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Thanks GS, as ever. I'll try Lucida console, but there sure don't seem to be
many around. Regards, Brett

"Gary''s Student" wrote:

Search for "non-proportional font"
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett


Gary''s Student

Monowidth font
 
The problem is with us. There HAS to be a set of free non-proportional fonts
out there somewhere. We are just inept searchers.

If your back to against the wall, there are a number of cheap font editors
available.

I would hate to buy an editor, spend the time using it, and then have to
admit to friends & family that I did so because I was too dumb to use Google
properly.
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

I was just saying to my partner (a graphic designer on Macs) that it staggers
me that with our ridiculously powerful PCs and Macs, we can't just convert
ANY font to monospace. I mean for crying out loud, all that has to be done is
create every character with the same amount of ems. That's got to be all of
30 or 40 lines of VB code. Anyway, we're stuck with it - unless you want to
create those 30 or 40 lines. Come on, don't be weak.

I too was a big fan of Verdana fo quite a while until I discivered the very
elegant cousin Tahoma. She's a little slimmer, you see. Regards, Brett.

"Gary''s Student" wrote:

I agree. If someone develops a non-proportional form of Verdana, I'd buy it.
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Thanks GS, as ever. I'll try Lucida console, but there sure don't seem to be
many around. Regards, Brett

"Gary''s Student" wrote:

Search for "non-proportional font"
--
Gary''s Student - gsnu200848


"Brettjg" wrote:

Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett


Peter T

Monowidth font
 
This should show you most of your fixed width fonts (not necessarily all and
not sure why not)

In a normal module and run GetFixedFonts on a new sheet

Option Explicit

'Private Const LF_FULLFACESIZE As Long = 64
'Private Const FF_ROMAN As Long = 16
'Private Const FF_SWISS As Long = 32
'Private Const FF_MODERN As Long = 48
'Private Const FF_SCRIPT As Long = 64

Private Const ANSI_CHARSET = 0
'private Const DEFAULT_CHARSET = 1

Private Const LF_FACESIZE = 32
Private Const TMPF_FIXED_PITCH As Long = &H1

Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(1 To LF_FACESIZE) As Byte
End Type

Private Type FONTSIGNATURE
fsUsb(4) As Long
fsCsb(2) As Long
End Type

Private Type NEWTEXTMETRIC
tmHeight As Long
tmAscent As Long
tmDescent As Long
tmInternalLeading As Long
tmExternalLeading As Long
tmAveCharWidth As Long
tmMaxCharWidth As Long
tmWeight As Long
tmOverhang As Long
tmDigitizedAspectX As Long
tmDigitizedAspectY As Long
tmFirstChar As Byte
tmLastChar As Byte
tmDefaultChar As Byte
tmBreakChar As Byte
tmItalic As Byte
tmUnderlined As Byte
tmStruckOut As Byte
tmPitchAndFamily As Byte
tmCharSet As Byte
ntmFlags As Long
ntmSizeEM As Long
ntmCellHeight As Long
ntmAveWidth As Long
End Type

Private Type NEWTEXTMETRICEX
ntmTm As NEWTEXTMETRIC
ntmFontSig As FONTSIGNATURE
End Type

Private Declare Function EnumFontFamiliesEx Lib "gdi32" _
Alias "EnumFontFamiliesExA" ( _
ByVal hDC As Long, ByRef lpLogFont As LOGFONT, _
ByVal lpEnumFontProc As Long, _
ByVal LParam As Long, ByVal dw As Long) As Long

Private Declare Function DeleteDC Lib "gdi32.dll" ( _
ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32.dll" ( _
ByVal hWnd As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Private mcFixed As Collection ', mcVar As Collection

Private Function EnumFontFamExProc(ByRef tLF As LOGFONT, _
ByRef tNTM As NEWTEXTMETRICEX, _
ByVal FontType As Long, ByRef LParam As Long) As Long
Dim sFontName As String

sFontName = StrConv(tLF.lfFaceName, vbUnicode)
sFontName = Left$(sFontName, InStr(sFontName & Chr$(0), Chr$(0)) - 1)

If (tLF.lfPitchAndFamily And TMPF_FIXED_PITCH) = TMPF_FIXED_PITCH Then
mcFixed.Add sFontName
'Elseif etc others

End If

EnumFontFamExProc = 1
End Function

Sub GetFixedFonts()
Dim hWndApp As Long, hWndXL7 As Long, hDC As Long
Dim i As Long
Dim sample As String
Dim tLgFnt As LOGFONT

Set mcFixed = New Collection

If Val(Application.Version) 9 Then
hWndApp = Application.hWnd
Else
hWndApp = FindWindow("XLMAIN", Application.Caption)
End If

hWndXL7 = FindWindowEx( _
FindWindowEx(hWndApp, 0, "XLDESK", vbNullString), _
0&, "EXCEL7", vbNullString)

hDC = GetDC(hWndXL7)

EnumFontFamiliesEx hDC, tLgFnt, AddressOf EnumFontFamExProc, ByVal 0&, 0

DeleteDC hDC

sample = "My Sample Text"
' or
sample = alphabet

For i = 1 To mcFixed.Count
Cells(i, 1) = mcFixed.Item(i)
With Cells(i, 2)
.Font.Name = mcFixed.Item(i)
.Value = sample
End With
Next

Range("A:B").EntireColumn.AutoFit
Set mcFixed = Nothing

End Sub

Function alphabet() As String
Dim i As Long
Dim s As String
For i = 65 To 65 + 25
s = s & Chr(i)
Next
alphabet = LCase(s) & s
End Function


Regards,
Peter T

"Brettjg" wrote in message
...
Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett




Gary''s Student

Monowidth font
 
Thanks!

I bow before your mastery!

Lucida Sans Typewriter looks good on my system
--
Gary''s Student - gsnu200848


"Peter T" wrote:

This should show you most of your fixed width fonts (not necessarily all and
not sure why not)

In a normal module and run GetFixedFonts on a new sheet

Option Explicit

'Private Const LF_FULLFACESIZE As Long = 64
'Private Const FF_ROMAN As Long = 16
'Private Const FF_SWISS As Long = 32
'Private Const FF_MODERN As Long = 48
'Private Const FF_SCRIPT As Long = 64

Private Const ANSI_CHARSET = 0
'private Const DEFAULT_CHARSET = 1

Private Const LF_FACESIZE = 32
Private Const TMPF_FIXED_PITCH As Long = &H1

Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(1 To LF_FACESIZE) As Byte
End Type

Private Type FONTSIGNATURE
fsUsb(4) As Long
fsCsb(2) As Long
End Type

Private Type NEWTEXTMETRIC
tmHeight As Long
tmAscent As Long
tmDescent As Long
tmInternalLeading As Long
tmExternalLeading As Long
tmAveCharWidth As Long
tmMaxCharWidth As Long
tmWeight As Long
tmOverhang As Long
tmDigitizedAspectX As Long
tmDigitizedAspectY As Long
tmFirstChar As Byte
tmLastChar As Byte
tmDefaultChar As Byte
tmBreakChar As Byte
tmItalic As Byte
tmUnderlined As Byte
tmStruckOut As Byte
tmPitchAndFamily As Byte
tmCharSet As Byte
ntmFlags As Long
ntmSizeEM As Long
ntmCellHeight As Long
ntmAveWidth As Long
End Type

Private Type NEWTEXTMETRICEX
ntmTm As NEWTEXTMETRIC
ntmFontSig As FONTSIGNATURE
End Type

Private Declare Function EnumFontFamiliesEx Lib "gdi32" _
Alias "EnumFontFamiliesExA" ( _
ByVal hDC As Long, ByRef lpLogFont As LOGFONT, _
ByVal lpEnumFontProc As Long, _
ByVal LParam As Long, ByVal dw As Long) As Long

Private Declare Function DeleteDC Lib "gdi32.dll" ( _
ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32.dll" ( _
ByVal hWnd As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Private mcFixed As Collection ', mcVar As Collection

Private Function EnumFontFamExProc(ByRef tLF As LOGFONT, _
ByRef tNTM As NEWTEXTMETRICEX, _
ByVal FontType As Long, ByRef LParam As Long) As Long
Dim sFontName As String

sFontName = StrConv(tLF.lfFaceName, vbUnicode)
sFontName = Left$(sFontName, InStr(sFontName & Chr$(0), Chr$(0)) - 1)

If (tLF.lfPitchAndFamily And TMPF_FIXED_PITCH) = TMPF_FIXED_PITCH Then
mcFixed.Add sFontName
'Elseif etc others

End If

EnumFontFamExProc = 1
End Function

Sub GetFixedFonts()
Dim hWndApp As Long, hWndXL7 As Long, hDC As Long
Dim i As Long
Dim sample As String
Dim tLgFnt As LOGFONT

Set mcFixed = New Collection

If Val(Application.Version) 9 Then
hWndApp = Application.hWnd
Else
hWndApp = FindWindow("XLMAIN", Application.Caption)
End If

hWndXL7 = FindWindowEx( _
FindWindowEx(hWndApp, 0, "XLDESK", vbNullString), _
0&, "EXCEL7", vbNullString)

hDC = GetDC(hWndXL7)

EnumFontFamiliesEx hDC, tLgFnt, AddressOf EnumFontFamExProc, ByVal 0&, 0

DeleteDC hDC

sample = "My Sample Text"
' or
sample = alphabet

For i = 1 To mcFixed.Count
Cells(i, 1) = mcFixed.Item(i)
With Cells(i, 2)
.Font.Name = mcFixed.Item(i)
.Value = sample
End With
Next

Range("A:B").EntireColumn.AutoFit
Set mcFixed = Nothing

End Sub

Function alphabet() As String
Dim i As Long
Dim s As String
For i = 65 To 65 + 25
s = s & Chr(i)
Next
alphabet = LCase(s) & s
End Function


Regards,
Peter T

"Brettjg" wrote in message
...
Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett





Charlotte E

Monowidth font
 
Lucida Console is king when it comes to monowidth font - use it for all my
monowidth purposes, including reading newsgroups and VBE :-)


Brettjg wrote:
Hello again

I have been using the very pleasant Tahoma font for my VBE but I
probably need to switch to a monowidth font for alignment reasons. As
an ex visual arts type I can't bleeding well stand the sight of
Courier so I searched Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts
are available? Regards, Brett




Brettjg

Monowidth font
 
Thanks very much Peter, that listed quite a few - Luicida Console looks about
the best. I found Lucida Sans Typewriter on google and it's not too bad.
Regards Brett

"Peter T" wrote:

This should show you most of your fixed width fonts (not necessarily all and
not sure why not)

In a normal module and run GetFixedFonts on a new sheet

Option Explicit

'Private Const LF_FULLFACESIZE As Long = 64
'Private Const FF_ROMAN As Long = 16
'Private Const FF_SWISS As Long = 32
'Private Const FF_MODERN As Long = 48
'Private Const FF_SCRIPT As Long = 64

Private Const ANSI_CHARSET = 0
'private Const DEFAULT_CHARSET = 1

Private Const LF_FACESIZE = 32
Private Const TMPF_FIXED_PITCH As Long = &H1

Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(1 To LF_FACESIZE) As Byte
End Type

Private Type FONTSIGNATURE
fsUsb(4) As Long
fsCsb(2) As Long
End Type

Private Type NEWTEXTMETRIC
tmHeight As Long
tmAscent As Long
tmDescent As Long
tmInternalLeading As Long
tmExternalLeading As Long
tmAveCharWidth As Long
tmMaxCharWidth As Long
tmWeight As Long
tmOverhang As Long
tmDigitizedAspectX As Long
tmDigitizedAspectY As Long
tmFirstChar As Byte
tmLastChar As Byte
tmDefaultChar As Byte
tmBreakChar As Byte
tmItalic As Byte
tmUnderlined As Byte
tmStruckOut As Byte
tmPitchAndFamily As Byte
tmCharSet As Byte
ntmFlags As Long
ntmSizeEM As Long
ntmCellHeight As Long
ntmAveWidth As Long
End Type

Private Type NEWTEXTMETRICEX
ntmTm As NEWTEXTMETRIC
ntmFontSig As FONTSIGNATURE
End Type

Private Declare Function EnumFontFamiliesEx Lib "gdi32" _
Alias "EnumFontFamiliesExA" ( _
ByVal hDC As Long, ByRef lpLogFont As LOGFONT, _
ByVal lpEnumFontProc As Long, _
ByVal LParam As Long, ByVal dw As Long) As Long

Private Declare Function DeleteDC Lib "gdi32.dll" ( _
ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32.dll" ( _
ByVal hWnd As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Private mcFixed As Collection ', mcVar As Collection

Private Function EnumFontFamExProc(ByRef tLF As LOGFONT, _
ByRef tNTM As NEWTEXTMETRICEX, _
ByVal FontType As Long, ByRef LParam As Long) As Long
Dim sFontName As String

sFontName = StrConv(tLF.lfFaceName, vbUnicode)
sFontName = Left$(sFontName, InStr(sFontName & Chr$(0), Chr$(0)) - 1)

If (tLF.lfPitchAndFamily And TMPF_FIXED_PITCH) = TMPF_FIXED_PITCH Then
mcFixed.Add sFontName
'Elseif etc others

End If

EnumFontFamExProc = 1
End Function

Sub GetFixedFonts()
Dim hWndApp As Long, hWndXL7 As Long, hDC As Long
Dim i As Long
Dim sample As String
Dim tLgFnt As LOGFONT

Set mcFixed = New Collection

If Val(Application.Version) 9 Then
hWndApp = Application.hWnd
Else
hWndApp = FindWindow("XLMAIN", Application.Caption)
End If

hWndXL7 = FindWindowEx( _
FindWindowEx(hWndApp, 0, "XLDESK", vbNullString), _
0&, "EXCEL7", vbNullString)

hDC = GetDC(hWndXL7)

EnumFontFamiliesEx hDC, tLgFnt, AddressOf EnumFontFamExProc, ByVal 0&, 0

DeleteDC hDC

sample = "My Sample Text"
' or
sample = alphabet

For i = 1 To mcFixed.Count
Cells(i, 1) = mcFixed.Item(i)
With Cells(i, 2)
.Font.Name = mcFixed.Item(i)
.Value = sample
End With
Next

Range("A:B").EntireColumn.AutoFit
Set mcFixed = Nothing

End Sub

Function alphabet() As String
Dim i As Long
Dim s As String
For i = 65 To 65 + 25
s = s & Chr(i)
Next
alphabet = LCase(s) & s
End Function


Regards,
Peter T

"Brettjg" wrote in message
...
Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett





Brettjg

Monowidth font
 
Thanks Charlotte. I need a bold font so I can see . properly. I found Lucida
Sans Typewriter on Google, and it's ok (the w is a bit furry). Brett

"Charlotte E" wrote:

Lucida Console is king when it comes to monowidth font - use it for all my
monowidth purposes, including reading newsgroups and VBE :-)


Brettjg wrote:
Hello again

I have been using the very pleasant Tahoma font for my VBE but I
probably need to switch to a monowidth font for alignment reasons. As
an ex visual arts type I can't bleeding well stand the sight of
Courier so I searched Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts
are available? Regards, Brett





Brettjg

Monowidth font
 
Hi GS

HEY! PROGRESS! My partner's boss said to search for programming fonts and
it's a revelation. The first site I've tried is
http://www.proggyfonts.com/
These fonts are rather small but there's a couple that have bold punctuation
whih is reallt great. The best I found there was either ProggyClean Bold Punc
or CodingFontTobi which has larger line spaces (kerning? - I've forgotten all
the font lingo). You can't go over 12pt with these becasue they get fuzzy,
and 12pt is still fairly small.

Next thing I've come across is
http://www.microsoft.com/typography/...roperty21.mspx
where you can download anextension that reveals much more info about the font.

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think ClearType
is a bunch of fuzzy crap (I have an LCD screen).

Vera Sans is available at
http://ftp.gnome.org/pub/GNOME/sourc...eam-vera/1.10/

RAIZE is avaliable at
http://www.raize.com/DevTools/Tools/RzFont.zip
and it's not too bad at all. The punctuation is clearly visible, even at 10
point

MONACO is not bad either - clear punctuation
http://www.gringod.com/wp-upload/MONACO.TTF

This sitewas a wealth of info
http://www.lowing.org/fonts/

Regards, Brett


Brettjg

Monowidth font
 
Hi Peter

Check my last reply to Gary's Student. I've come across some very
interesting fonts, of which I'm using Monaco (gotta love those parentheses).
Regards Brett.

"Peter T" wrote:

This should show you most of your fixed width fonts (not necessarily all and
not sure why not)

In a normal module and run GetFixedFonts on a new sheet

Option Explicit

'Private Const LF_FULLFACESIZE As Long = 64
'Private Const FF_ROMAN As Long = 16
'Private Const FF_SWISS As Long = 32
'Private Const FF_MODERN As Long = 48
'Private Const FF_SCRIPT As Long = 64

Private Const ANSI_CHARSET = 0
'private Const DEFAULT_CHARSET = 1

Private Const LF_FACESIZE = 32
Private Const TMPF_FIXED_PITCH As Long = &H1

Private Type LOGFONT
lfHeight As Long
lfWidth As Long
lfEscapement As Long
lfOrientation As Long
lfWeight As Long
lfItalic As Byte
lfUnderline As Byte
lfStrikeOut As Byte
lfCharSet As Byte
lfOutPrecision As Byte
lfClipPrecision As Byte
lfQuality As Byte
lfPitchAndFamily As Byte
lfFaceName(1 To LF_FACESIZE) As Byte
End Type

Private Type FONTSIGNATURE
fsUsb(4) As Long
fsCsb(2) As Long
End Type

Private Type NEWTEXTMETRIC
tmHeight As Long
tmAscent As Long
tmDescent As Long
tmInternalLeading As Long
tmExternalLeading As Long
tmAveCharWidth As Long
tmMaxCharWidth As Long
tmWeight As Long
tmOverhang As Long
tmDigitizedAspectX As Long
tmDigitizedAspectY As Long
tmFirstChar As Byte
tmLastChar As Byte
tmDefaultChar As Byte
tmBreakChar As Byte
tmItalic As Byte
tmUnderlined As Byte
tmStruckOut As Byte
tmPitchAndFamily As Byte
tmCharSet As Byte
ntmFlags As Long
ntmSizeEM As Long
ntmCellHeight As Long
ntmAveWidth As Long
End Type

Private Type NEWTEXTMETRICEX
ntmTm As NEWTEXTMETRIC
ntmFontSig As FONTSIGNATURE
End Type

Private Declare Function EnumFontFamiliesEx Lib "gdi32" _
Alias "EnumFontFamiliesExA" ( _
ByVal hDC As Long, ByRef lpLogFont As LOGFONT, _
ByVal lpEnumFontProc As Long, _
ByVal LParam As Long, ByVal dw As Long) As Long

Private Declare Function DeleteDC Lib "gdi32.dll" ( _
ByVal hDC As Long) As Long
Private Declare Function GetDC Lib "user32.dll" ( _
ByVal hWnd As Long) As Long

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32.dll" _
Alias "FindWindowExA" ( _
ByVal hWnd1 As Long, _
ByVal hWnd2 As Long, _
ByVal lpsz1 As String, _
ByVal lpsz2 As String) As Long

Private mcFixed As Collection ', mcVar As Collection

Private Function EnumFontFamExProc(ByRef tLF As LOGFONT, _
ByRef tNTM As NEWTEXTMETRICEX, _
ByVal FontType As Long, ByRef LParam As Long) As Long
Dim sFontName As String

sFontName = StrConv(tLF.lfFaceName, vbUnicode)
sFontName = Left$(sFontName, InStr(sFontName & Chr$(0), Chr$(0)) - 1)

If (tLF.lfPitchAndFamily And TMPF_FIXED_PITCH) = TMPF_FIXED_PITCH Then
mcFixed.Add sFontName
'Elseif etc others

End If

EnumFontFamExProc = 1
End Function

Sub GetFixedFonts()
Dim hWndApp As Long, hWndXL7 As Long, hDC As Long
Dim i As Long
Dim sample As String
Dim tLgFnt As LOGFONT

Set mcFixed = New Collection

If Val(Application.Version) 9 Then
hWndApp = Application.hWnd
Else
hWndApp = FindWindow("XLMAIN", Application.Caption)
End If

hWndXL7 = FindWindowEx( _
FindWindowEx(hWndApp, 0, "XLDESK", vbNullString), _
0&, "EXCEL7", vbNullString)

hDC = GetDC(hWndXL7)

EnumFontFamiliesEx hDC, tLgFnt, AddressOf EnumFontFamExProc, ByVal 0&, 0

DeleteDC hDC

sample = "My Sample Text"
' or
sample = alphabet

For i = 1 To mcFixed.Count
Cells(i, 1) = mcFixed.Item(i)
With Cells(i, 2)
.Font.Name = mcFixed.Item(i)
.Value = sample
End With
Next

Range("A:B").EntireColumn.AutoFit
Set mcFixed = Nothing

End Sub

Function alphabet() As String
Dim i As Long
Dim s As String
For i = 65 To 65 + 25
s = s & Chr(i)
Next
alphabet = LCase(s) & s
End Function


Regards,
Peter T

"Brettjg" wrote in message
...
Hello again

I have been using the very pleasant Tahoma font for my VBE but I probably
need to switch to a monowidth font for alignment reasons. As an ex visual
arts type I can't bleeding well stand the sight of Courier so I searched
Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts are
available? Regards, Brett





Brettjg

Monowidth font
 
Hi Charlotte

The King Lucida is DEAD! Long live the King of Monaco!

Check my last reply to Gary's Student. I've come across some very
interesting fonts, of which I'm using Monaco (gotta love those parentheses).
Regards Brett.

"Charlotte E" wrote:

Lucida Console is king when it comes to monowidth font - use it for all my
monowidth purposes, including reading newsgroups and VBE :-)


Brettjg wrote:
Hello again

I have been using the very pleasant Tahoma font for my VBE but I
probably need to switch to a monowidth font for alignment reasons. As
an ex visual arts type I can't bleeding well stand the sight of
Courier so I searched Google with not a lot of luck.

So, can anyone tell me what other reasonably handsome monowidth fonts
are available? Regards, Brett





Peter T

Monowidth font
 
You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).


I also played around with that a while back and found ClearType to be a
waste of time. The Office 2007 app's were awful on my LCD, worse than other
apps for some reason. They have an additional Clear-type option which if
anything makes things even worse (depends though on the particular app -
Outlook dreadful). I found myself not using Excel 2007 unless I absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that recomended
for the monitor, did that and suddenly crystal clear. Unfortunately though,
for me that meant a setting to max res which means now everything is far too
small to read. Can't win )-:

Regards,
Peter T



Brett the Brat

Monowidth font
 
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).


I also played around with that a while back and found ClearType to be a
waste of time. The Office 2007 app's were awful on my LCD, worse than other
apps for some reason. They have an additional Clear-type option which if
anything makes things even worse (depends though on the particular app -
Outlook dreadful). I found myself not using Excel 2007 unless I absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that recomended
for the monitor, did that and suddenly crystal clear. Unfortunately though,
for me that meant a setting to max res which means now everything is far too
small to read. Can't win )-:

Regards,
Peter T




Peter T

Monowidth font
 
But is your max res that the "recommended" res

Regards,
Peter T

"Brett the Brat" wrote in message
...
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).


I also played around with that a while back and found ClearType to be a
waste of time. The Office 2007 app's were awful on my LCD, worse than
other
apps for some reason. They have an additional Clear-type option which if
anything makes things even worse (depends though on the particular app -
Outlook dreadful). I found myself not using Excel 2007 unless I
absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that recomended
for the monitor, did that and suddenly crystal clear. Unfortunately
though,
for me that meant a setting to max res which means now everything is far
too
small to read. Can't win )-:

Regards,
Peter T






Peter T

Monowidth font
 
Better type that again

Is your max res the same as the "recommended" res

Peter T

"Peter T" <peter_t@discussions wrote in message
...
But is your max res that the "recommended" res

Regards,
Peter T

"Brett the Brat" wrote in message
...
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).

I also played around with that a while back and found ClearType to be a
waste of time. The Office 2007 app's were awful on my LCD, worse than
other
apps for some reason. They have an additional Clear-type option which if
anything makes things even worse (depends though on the particular app -
Outlook dreadful). I found myself not using Excel 2007 unless I
absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that
recomended
for the monitor, did that and suddenly crystal clear. Unfortunately
though,
for me that meant a setting to max res which means now everything is far
too
small to read. Can't win )-:

Regards,
Peter T








Brett the Brat

Monowidth font
 
Hmm. Tried to find out what the recommended res is, but can't see anything in
the control panel. Any clues?

"Peter T" wrote:

Better type that again

Is your max res the same as the "recommended" res

Peter T

"Peter T" <peter_t@discussions wrote in message
...
But is your max res that the "recommended" res

Regards,
Peter T

"Brett the Brat" wrote in message
...
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).

I also played around with that a while back and found ClearType to be a
waste of time. The Office 2007 app's were awful on my LCD, worse than
other
apps for some reason. They have an additional Clear-type option which if
anything makes things even worse (depends though on the particular app -
Outlook dreadful). I found myself not using Excel 2007 unless I
absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that
recomended
for the monitor, did that and suddenly crystal clear. Unfortunately
though,
for me that meant a setting to max res which means now everything is far
too
small to read. Can't win )-:

Regards,
Peter T









Peter T

Monowidth font
 
You'll probably need to refer to the manual (of the LCD monitor) or maybe
you can get the specs from the manufacturer's web site.

Otherwise try the respective resolutions supported by the monitor.

Regards,
Peter T

"Brett the Brat" wrote in message
...
Hmm. Tried to find out what the recommended res is, but can't see anything
in
the control panel. Any clues?

"Peter T" wrote:

Better type that again

Is your max res the same as the "recommended" res

Peter T

"Peter T" <peter_t@discussions wrote in message
...
But is your max res that the "recommended" res

Regards,
Peter T

"Brett the Brat" wrote in
message
...
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).

I also played around with that a while back and found ClearType to be
a
waste of time. The Office 2007 app's were awful on my LCD, worse than
other
apps for some reason. They have an additional Clear-type option which
if
anything makes things even worse (depends though on the particular
app -
Outlook dreadful). I found myself not using Excel 2007 unless I
absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that
recomended
for the monitor, did that and suddenly crystal clear. Unfortunately
though,
for me that meant a setting to max res which means now everything is
far
too
small to read. Can't win )-:

Regards,
Peter T











Brett the Brat

Monowidth font
 
Cheers Peter

"Peter T" wrote:

You'll probably need to refer to the manual (of the LCD monitor) or maybe
you can get the specs from the manufacturer's web site.

Otherwise try the respective resolutions supported by the monitor.

Regards,
Peter T

"Brett the Brat" wrote in message
...
Hmm. Tried to find out what the recommended res is, but can't see anything
in
the control panel. Any clues?

"Peter T" wrote:

Better type that again

Is your max res the same as the "recommended" res

Peter T

"Peter T" <peter_t@discussions wrote in message
...
But is your max res that the "recommended" res

Regards,
Peter T

"Brett the Brat" wrote in
message
...
Which is in complete contrast to my LCD which is set the max res, but
ClearType is still rubbish. As you say, can't win.

"Peter T" wrote:

You may also get some value out of
http://www.microsoft.com/typography/...ner/Step2.aspx
where you can customise the ClearType settings. Personally I think
ClearType
is a bunch of fuzzy crap (I have an LCD screen).

I also played around with that a while back and found ClearType to be
a
waste of time. The Office 2007 app's were awful on my LCD, worse than
other
apps for some reason. They have an additional Clear-type option which
if
anything makes things even worse (depends though on the particular
app -
Outlook dreadful). I found myself not using Excel 2007 unless I
absolutely
had to because it was giving me eye strain.

Eventually I found out it's best to set the resolution to that
recomended
for the monitor, did that and suddenly crystal clear. Unfortunately
though,
for me that meant a setting to max res which means now everything is
far
too
small to read. Can't win )-:

Regards,
Peter T













All times are GMT +1. The time now is 09:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com