Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-26-2021, 12:13 AM
SamDsouza SamDsouza is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2013
Advanced Beginner
General Question on List of Font Names
 
Join Date: Aug 2019
Posts: 64
SamDsouza is on a distinguished road
Default General Question on List of Font Names

Hello



Has Anyone got an idea that

The List of Font.Names on MS-Word Document in Home Button and Userform.Textbox.Font.Names are Equal or is the List of Font Names limited in userform.Textbox.

So Basicially How many Font Names will be there in Word Document against the Font Names available in Userform. Textbox or Is the List equal

Does this to depend on MS-Office Version and Window versions too ? Or is the same for all the MS-Office and Windows versions
How is this like ?

Because on basis of above I was planning to upload dropdown with all the Font Names in Combobox ?

Thanks and Regards
SamD
Reply With Quote
  #2  
Old 02-26-2021, 04:52 AM
gmayor's Avatar
gmayor gmayor is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,406
gmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to all
Default

How are you adding the names to the listbox.

Try the following which adds all the font names to the list box ListBox1. On my PC the count is 660 fonts.

Code:
Private Sub UserForm_Initialize()
Dim arrFonts As Variant
Dim lng_Index As Long
    With ListBox1
        .Clear
        ReDim arrFonts(Application.FontNames.Count - 1)
        For lng_Index = 0 To Application.FontNames.Count - 1
            arrFonts(lng_Index) = Application.FontNames(lng_Index + 1)
        Next lng_Index
        SortArray arrFonts
        .List = arrFonts
        MsgBox .ListCount
    End With
End Sub

Private Function SortArray(Arr As Variant) As Variant
Dim i As Long
Dim j As Long
Dim Temp As Variant
    For i = LBound(Arr) To UBound(Arr) - 1
        For j = i + 1 To UBound(Arr)
            If UCase(Arr(i)) > UCase(Arr(j)) Then
                Temp = Arr(j)
                Arr(j) = Arr(i)
                Arr(i) = Temp
            End If
        Next j
    Next i
    SortArray = Arr
End Function
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 02-26-2021, 05:27 AM
SamDsouza SamDsouza is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2013
Advanced Beginner
General Question on List of Font Names
 
Join Date: Aug 2019
Posts: 64
SamDsouza is on a distinguished road
Default

GMayor

Indeed Quick response

Instead of Listbox I've used Combobox. Hope you dont mind
Quote:
Try the following which adds all the font names to the list box ListBox1. On my PC the count is 660 fonts.
I am getting count as 160 in Msgbox

Quote:
How are you adding the names to the listbox
I really did not have idea to incorporate the Font names into Combo or Listbox. The method you have only showed by coding.

Quote:
On my PC the count is 660 fonts.
Are the 660 fonts on Word Document in Home button outof which only 160 fonts Count are for Textbox and Labels

SamD
Reply With Quote
  #4  
Old 02-26-2021, 09:51 PM
gmayor's Avatar
gmayor gmayor is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,406
gmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to all
Default

The home tab lists the fonts the current printer is able to print.
The macro lists all the installed fonts.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 02-26-2021, 10:33 PM
SamDsouza SamDsouza is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2013
Advanced Beginner
General Question on List of Font Names
 
Join Date: Aug 2019
Posts: 64
SamDsouza is on a distinguished road
Default

Quote:
The home tab lists the fonts the current printer is able to print.
The macro lists all the installed fonts.
OK. Great

So any Particular macro to get only list of Home Tab Fonts

Why you got 660 count and why i got 160 count. Is it b'cos ComboBox has limitation

SamD
Reply With Quote
  #6  
Old 02-27-2021, 05:04 AM
gmayor's Avatar
gmayor gmayor is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,406
gmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to all
Default

Quote:
Originally Posted by SamDsouza View Post
Why you got 660 count and why i got 160 count. Is it b'cos ComboBox has limitation
SamD
It's because I have more fonts installed.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 02-27-2021, 09:33 PM
SamDsouza SamDsouza is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2013
Advanced Beginner
General Question on List of Font Names
 
Join Date: Aug 2019
Posts: 64
SamDsouza is on a distinguished road
Default

Quote:
It's because I have more fonts installed
Any Ideas ? From Where can we install the same ?

SamD
Reply With Quote
  #8  
Old 02-27-2021, 10:20 PM
Guessed's Avatar
Guessed Guessed is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 2,151
Guessed is a name known to allGuessed is a name known to allGuessed is a name known to allGuessed is a name known to allGuessed is a name known to allGuessed is a name known to all
Default

Sam

Fonts can come from a variety of sources and there is no reason why you would need the same list of fonts that Graham has unless you are sharing files with him and have included the whole gamut in a document. A well designed document shouldn't actually use more than one or two typefaces so it is highly unlikely that you NEED 600+ fonts. Loading hundreds of fonts you will never use is also not advised as it makes life more difficult and potentially slows applications down (eg opening the app or displaying available fonts).
  1. There is a basic set of fonts that is installed with Windows and this can vary from versions of Windows and languages.
  2. Additional Fonts are often installed (or available) with software, such as Adobe or Corel products.
  3. You can download free fonts from some websites and install them. This can be a bit hit and miss since those sites are not getting paid from providing the typeface and the metrics (how individual characters space themselves) can be sloppy depending on how much effort was put into creation.
  4. Fonts are sold by 'type foundries' (such as Monotype or Adobe) so you can pay big $ for large font families if you want the 'best'
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #9  
Old 02-28-2021, 01:56 AM
gmayor's Avatar
gmayor gmayor is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,406
gmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to allgmayor is a name known to all
Default

I would go further.You simply don't need that many fonts. The only reason I have so many is that they are often installed with assorted software regardless of whether you actually want them or not and also with various language versions of Windows.

I rarely use more than four fonts in any normal circumstances. One day I may get round to removing some of the unused ones, no doubt to find that some software doesn't work properly without them, but I am sure I could manage with standard fonts Calibri, Times New Roman and Tahoma (which I use for my userforms).

For Word projects it is best to declare which standard fonts (if you want the project to be widely used) are available to that project.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #10  
Old 02-28-2021, 05:22 AM
macropod's Avatar
macropod macropod is online now General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 20,958
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

You can usually find all the installed fonts in:
C:\Windows\Fonts
My system lists 225. However that isn't the same as the number of font files, as Windows often has as many as four font files per font - regular, bold, italic, and bold italic.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 02-28-2021, 07:24 PM
SamDsouza SamDsouza is offline General Question on List of Font Names Windows 10 General Question on List of Font Names Office 2013
Advanced Beginner
General Question on List of Font Names
 
Join Date: Aug 2019
Posts: 64
SamDsouza is on a distinguished road
Default

Thank you very much GMayor for the macro and suggestions
Thank you Andrew and Paul for your Input and suggestions

After going through your suggestions
Now I will not install more fonts. Though MS-Word has 160 for me. More than Enough

Thank you once more

SamD
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
General question about forms JGilrain Word 6 03-15-2019 07:14 AM
General Question Magdalen Word 3 02-09-2018 07:05 AM
2 general question about coding puff Excel Programming 1 12-07-2017 08:53 AM
General Question on List of Font Names Excel General Question Excel#1 Excel 1 07-09-2015 11:16 PM
General VBA Question velohead Word VBA 0 07-05-2010 10:41 PM

Other Forums: Access Forums - Senior Forums

All times are GMT -7. The time now is 07:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft