Mathematica Asked on April 6, 2021
I want to test the font like this. On my machine, there are 270 fonts but I can’t not display them all one one screen size so I can only print each time 50 fonts. How can I display it as in the image below?
fontlist = FE`Evaluate[FEPrivate`GetPopupList["MenuListFonts"]];
Panel@Row[fontlist[[1 ;; 50]] /.
Rule[x_, y_] :>
Style[ToString@"Font Test - " <> x , 14, FontFamily -> y], "
[FilledSquare] " "n"]
Panel @
Multicolumn[Row[{"■ ", #}] & /@ (fontlist[[1 ;; 50]] /.
Rule[x_, y_] :> Style[ToString@"Font Test - " <> x, 14, FontFamily -> y]),
3, Appearance -> "Horizontal"]
Panel @
Multicolumn[Row[{"■ ", #}] & /@
(fontlist[[1 ;; 50]] /. Rule[x_, y_] :>
Style[ToString@"Font Test - " <> x, 14, FontFamily -> y]),
3, Appearance -> "Horizontal", Spacings -> {1, 1},
Background -> {{{LightBlue, LightOrange}}, Automatic},
Frame -> All, FrameStyle -> White]
You can also Partition
the input list and use Grid
. If you use Scaled
when setting the option ItemSize
column widths will automatically adjust to the available window width:
Panel @ Grid[Partition[Row[{"■ ", #}] & /@
(fontlist[[1 ;; 50]] /. Rule[x_, y_] :>
Style[ToString@"Font Test - " <> x, 14, FontFamily -> y]),
2, 2, {1, 1}, {}],
Alignment -> {Left, Center},
ItemSize -> {Scaled[1/2], Automatic}, Spacings -> {1, 1},
Background -> {{{LightBlue, LightOrange}}, Automatic},
Frame -> All, FrameStyle -> White]
Correct answer by kglr on April 6, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP