This is probably my last effort on this.... circles,
but, I finally figured out find in Ruby Console, escapes, escapes, escapes...
THE THIRD WAY... no Font Book... no fc-list... just plain old find >> mdls... not the fastest, but not too bad.
inculed is Dan's tester, these all created 3D text from console, only Font Book and usr/local/bin/fc-list do that out of the can.
a=(`find /System/Library/Fonts\ /Library/Fonts\ ~/Library/Fonts\ \\( -name "*.ttf" -o -name "*.otf" \\) -type f`).split("\n").map! { |f| f.gsub(" ", "\\ ")} #need this or something to catch spaces in filenames
b=(a.collect{|x| `mdls -name com_apple_ats_name_family -raw #{x}`}).map! { |f| f.split(",")[0]} #the other items in each array are unicode strings for other languages, if you want those use Font Book
c=b.map { |f| f[/[("\s]+([^"\n]+)[)"\s]+/m,1] }.uniq!.sort![2..-1] #[0] is empty, [1] is a dot file, could remove them
macFonts = c
chunksize = 1
chunk = 1
limit = macFonts.length
model = Sketchup.active_model
fsize = 1.0
linespacing = 1.2
bold = false
italic = false
thick = 0.05
filled = true
quality = 0.0
i = 0
while i < limit
begin
#
model.start_operation("3D Fontnames (#{chunk})")
#
chunksize.times do |n|
#
break if i == limit
#
item = macFonts[i]
grp = model.entities.add_group()
grp.entities.add_3d_text( "#{item}", TextAlignCenter, "#{item}",
bold, italic, fsize, quality, 0.0, filled, thick )
grp.name= item
grp.move!( Geom;;Transformation.new(Geom;;Vector3d.new(0,-(i*linespacing),0)) )
#
i += 1
#
end # chunk
#
model.commit_operation()
#
rescue Exception => e
puts("\n*** macFonts group Error! ***")
puts(" i = #{i}")
puts(" chunk = #{chunk}")
puts(" font = #{macFonts[i]}\n")
model.abort_operation()
puts("Error #<#{e.class.name}; #{e.message}>")
puts(e.backtrace) if $VERBOSE
raise
end
chunk += 1
end # while