Tk Source Code

Artifact [38d7ee1e]
Login

Artifact 38d7ee1e0a09f25539579970ec34bec89b15d196:

Ticket change [38d7ee1e] - Ticket [c0dbdd3f] Tk Compatability Fonts block access to system fonts status still Open with 4 other changes by fvogel 2016-12-02 21:57:37.
D 2016-12-02T21:57:37.814
J assignee fvogel
J icomment Sorry,\smy\slink\sbelow\swas\sin\sfact\snot\srelevant.\sA\sless\ssuperficial\sanalysis\sof\swhat\sis\shappening\swhen\scalling\s<code>font\sactual\sCourier</code>\s(on\sWindows,\swhich\sis\sthe\scase\sfor\sthe\spresent\sreport)\sis\sas\sfollows:\r\n\r\n<code>Tk_FontObjCmd()</code>:\scase\sFONT_ACTUAL\slooks\sfor\sthe\sfont\snamed\s"Courier"\sby\scalling\s<code>Tk_AllocFontFromObj()</code>.\r\n\r\nThis\scall\sfirst\slooks\s(<code>TkpGetNativeFont()</code>)\sfor\sa\snative\sfont\sof\sthis\sname.\sThere\sis\snone,\stherefore\sit\stries\sto\sfind\sthe\sclosest\smatching\sfont\sby\scalling\s<code>TkpGetFontFromAttributes()</code>.\r\n\r\n<code>TkpGetFontFromAttributes()</code>\sfirst\stries\sthe\sfont\sname,\s"Courier",\sand\slooks\sif\sa\sfont\sfamily\sor\san\salias\sexists:\s<code>FamilyOrAliasExists()</code>,\swhich\sfirst\scalls\s<code>FamilyExists()</code>.\r\n\r\nAnd\sin\s<code>FamilyExists()</code>\sthere\sis\san\s[http://core.tcl.tk/tk/artifact/cad11b506ccb619d?ln=2528,2542|intentional\srule\sout\sof\s"Courier"\sfont].\r\n\r\nRemoving\sthose\slines\sin\sthe\ssource\scode\smakes\s<code>font\sactual\sCourier</code>\sreturn:\s<pre>\s-family\sCourier\s-size\s12\s-weight\snormal\s-slant\sroman\s-underline\s0\s-overstrike\s0</pre>\r\n\r\nThis\shas\sbeen\sin\sTk\ssince\s1999,\sand\sthe\sreason\swhy\sit's\sthere\slooks\svalid\sto\sme.
J login fvogel
J mimetype text/x-fossil-wiki
K c0dbdd3ff35697b57935f7d16e47336ca5043277
U fvogel
Z 5813807a127886b6bec51a94299bd023