<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 12, 2017, at 23:43, Allan Odgaard <<a href="mailto:mailinglist@textmate.org" class="">mailinglist@textmate.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">


<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" class="">

<div class="">
<div style="font-family:sans-serif" class=""><div style="white-space:normal" class=""><p dir="auto" class="">On 3 Jul 2017, at 23:07, じょいすじょん wrote:</p>

</div>
<div style="white-space:normal" class=""><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px" class=""><p dir="auto" class="">Setting or variable 'fontName' not found<br class="">
[…]<br class="">
Is there a modern alternative to fontName?<br class="">
Or, even better, a reference for that and other keys?</p>
</blockquote></div>
<div style="white-space:normal" class=""><p dir="auto" class="">There is no good solution for this.</p><p dir="auto" class="">The <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">tm_query</code> tool is simply reading your various <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">.tm_properties</code> files (including the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">Default.tmProperties</code> included with TextMate) and returning the requested value (or exiting with a non-zero return code if not found). So there is no fixed list of keys.</p><p dir="auto" class="">Originally the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">Default.tmProperties</code> file had a setting for <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">fontName</code> but because Apple has changed the default fixed width font, it wasn’t good to put a hardcoded name in <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">Default.tmProperties</code> (since TextMate should default to the fixed width font that is default for the user’s OS version).</p><p dir="auto" class="">I am not sure for what the TextMate Jedi Completion bundle uses the font name, but it will need its own fallback, incase <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">$TM_QUERY</code> exits with a non-zero return code.</p><p dir="auto" class="">You can hardcode the fallback as <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">Menlo-Regular</code> but technically the user can override the system’s default fixed width font using the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">NSFixedPitchFont</code> user defaults setting.</p><p dir="auto" class="">This can be obtained using: <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">defaults read -g NSFixedPitchFont</code></p><p dir="auto" class="">The default size can be changed using the <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7" class="">NSFixedPitchFontSize</code> key.</p>
</div>
</div>
</div>

<br class=""></div></blockquote>OK, got it. So the response is correct, the key doesn't exist.</div><div>The defaults keys you provided also do not exist by default on my system.</div>But a font descriptor would return a user preference or a system default.<div class="">There's not a great solution you're right.</div><div class="">Core Text and AppKit are both kind of vague.</div><div class="">The solution there seems to be to start with a font and apply the fixed width trait to get a descriptor for a font that comes close to matching somehow (who knows how? personal taste?) or present a UI and let a user select something. Still does not give a default does it? How loopy these APIs can be :(</div></body></html>