<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Things to explore, code extracted from DrGeo:</p>
<p>TrueTypeFontFamily readTrueTypeFontEntry: self fontPath //
languageFont file.<br>
PreferenceSet setDefaultFont: languageFont family.<br>
Preferences at: #defaultFontSize put: 12.</p>
<p>PreferenceSet setDefaultFont: 'DejaVu Sans'.<br>
Preferences at: #defaultFontSize put: 11.<br>
</p>
<p>fontOfSize: anInteger<br>
^ FontFamily defaultFamilyPointSize: (Theme current scale:
anInteger)</p>
<p>You will have to fill the hole and experiment. I have not
explored much font usage beside these code snippet.</p>
<p>Try loading a font, then from the inspector find how to change
its size. There are clues in Ken message.<br>
</p>
<p>Hilaire<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 20/07/2024 à 19:55, Mark Volkmann
via Cuis-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAFfRWnX1RM-8g8ZEzGAjAYdEeuhLE3zw4riAOSgBZ+wVurYwWg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Thanks Ken!
<div>Is there a shorter way to just get the "default" font?<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Jul 20, 2024 at
12:39 PM <<a href="mailto:ken.dickey@whidbey.com"
moz-do-not-send="true" class="moz-txt-link-freetext">ken.dickey@whidbey.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On
2024-07-20 10:30, Mark Volkmann via Cuis-dev wrote:<br>
<br>
> - get a list of all the installed fonts<br>
> - get an instance of a given font with a specific point
size<br>
> <br>
> Can someone share how to do those?<br>
<br>
Sure. The UI-MetaProperties package -- soon to be renamed <br>
UI-VisualMetaProperties has code to "edit" a font.<br>
<br>
The code (copied below) first sets a font and then its size.<br>
<br>
I suspect you can further unravel from this thread.. ;^)<br>
<br>
props at: #acceptsFont<br>
put: (MetaProperty<br>
kind: AbstractFont<br>
editProc: [ :morph :metaProp
:menuItem |<br>
| oldFont fontFamily
fontSize newFont |<br>
oldFont := menuItem
propertyValue.<br>
fontSize := oldFont
pointSize.<br>
fontFamily :=
FontFamily promptUser.<br>
fontSize := FontFamily
promptUserForSize: fontSize fontFamily: <br>
fontFamily.<br>
newFont := fontFamily
atPointSize: fontSize.<br>
newFont ifNotNil: [ :f
| menuItem propertyValue: f. morph <br>
redrawNeeded ] ] ).<br>
<br>
Good on ya,<br>
-KenD<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif">R.
Mark Volkmann</font></div>
<div><span style="font-size:12.8px"><font
face="arial, helvetica, sans-serif">Object
Computing, Inc.</font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
</blockquote>
</body>
</html>