Font in Text Editor

131 views
Skip to first unread message

Damon Pritchett

unread,
Jun 9, 2019, 3:13:18 PM6/9/19
to TiddlyWiki
Hello again,

I'm having trouble getting my TW to recognize Google fonts. The font family and code font family take the fonts just fine, but I can't get the text editor to do it. I've looked through all of the stylesheets that I know of, but haven't been able to find the smoking gun. I'm embedding the fonts based  on the instructions found here: https://ibnishak.github.io/Tesseract/UI/index.html#How%20to%20use%20google%20fonts%20in%20TW5.

Any thoughts on how to get passed this. Right now, I'm using the generic monospace font, but I would like to use the Roboto Mono font (again, Roboto Mono works find in code font family, but not text editor).

Thanks,

Damon

h0p3

unread,
Jun 9, 2019, 8:17:40 PM6/9/19
to TiddlyWiki
I had a similar problem, but it might not be the same (I have a custom embedded font, and I can't say if the same effect is occurring in your case). I use both of these: https://philosopher.life/#%24%3A%2F_toggle-editor-toolbar_preview:%24%3A%2F_toggle-editor-toolbar_preview%20%24%3A%2Fplugins%2Fdanielo%2FkeyboardSnippets

The toggle allows you to have your custom font, and the keyboard snippets will give back your hotkeys which are broken by the toggle. This may cost you access to other plugins.

Damon Pritchett

unread,
Jun 9, 2019, 8:37:21 PM6/9/19
to TiddlyWiki
Thanks. That's very interesting and seems to be the same issue after visiting your site. I'll need to think about whether or not the font is that big of deal or not to do something similar.

Interesting site by the way.

Damon

Jeremy Ruston

unread,
Jun 10, 2019, 4:00:12 AM6/10/19
to tiddl...@googlegroups.com
Hi Damon, h0p3,

The cause here is that the default editor uses an iframe to wrap the textarea; it’s done so that the textarea focus is retained even if the user clicks on a toolbar button. The problem, of course, is that the custom font isn’t loaded into the iframe, and so isn’t available to the textarea.

You can workaround it by using the non-framed editor (which lacks the toolbar buttons), but it may be worth trying the CodeMirror plugin.

Alternately, I think we’d need to add a mechanism for adding stylesheet fragments to the editor iframe.

Best wishes

Jeremy



--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5d62431f-5f6d-43e5-b7ca-24b36d73325d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Damon Pritchett

unread,
Jun 10, 2019, 3:13:27 PM6/10/19
to TiddlyWiki
Thanks Jeremy,

Very much appreciated and good to know that it wasn't something I was doing or not doing.

One question to which you may or may not know the answer. I had been using the plugin edit-comptext which allows for auto completion of internal links. Is there something that can be added to CodeMirror with this functionality? Currently, it seems that you can use edit-comptext  with the default editor, but not with CodeMirror.

Cheers,

Damon


On Monday, June 10, 2019 at 3:00:12 AM UTC-5, Jeremy Ruston wrote:
Hi Damon, h0p3,

The cause here is that the default editor uses an iframe to wrap the textarea; it’s done so that the textarea focus is retained even if the user clicks on a toolbar button. The problem, of course, is that the custom font isn’t loaded into the iframe, and so isn’t available to the textarea.

You can workaround it by using the non-framed editor (which lacks the toolbar buttons), but it may be worth trying the CodeMirror plugin.

Alternately, I think we’d need to add a mechanism for adding stylesheet fragments to the editor iframe.

Best wishes

Jeremy

On 9 Jun 2019, at 20:13, Damon Pritchett <damon.p...@gmail.com> wrote:

Hello again,

I'm having trouble getting my TW to recognize Google fonts. The font family and code font family take the fonts just fine, but I can't get the text editor to do it. I've looked through all of the stylesheets that I know of, but haven't been able to find the smoking gun. I'm embedding the fonts based  on the instructions found here: https://ibnishak.github.io/Tesseract/UI/index.html#How%20to%20use%20google%20fonts%20in%20TW5.

Any thoughts on how to get passed this. Right now, I'm using the generic monospace font, but I would like to use the Roboto Mono font (again, Roboto Mono works find in code font family, but not text editor).

Thanks,

Damon

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Jeremy Ruston

unread,
Jun 10, 2019, 3:50:42 PM6/10/19
to tiddl...@googlegroups.com
Hi Damon

Very much appreciated and good to know that it wasn't something I was doing or not doing.

Indeed, it’s very jarring when one runs into the unexpected consequences of the nested iframe.

One question to which you may or may not know the answer. I had been using the plugin edit-comptext which allows for auto completion of internal links. Is there something that can be added to CodeMirror with this functionality? Currently, it seems that you can use edit-comptext  with the default editor, but not with CodeMirror.

There is an autocomplete plugin in the official plugin library that is activated with ctrl-space, but I haven’t used it myself:


Best wishes

Jeremy


Cheers,

Damon


On Monday, June 10, 2019 at 3:00:12 AM UTC-5, Jeremy Ruston wrote:
Hi Damon, h0p3,

The cause here is that the default editor uses an iframe to wrap the textarea; it’s done so that the textarea focus is retained even if the user clicks on a toolbar button. The problem, of course, is that the custom font isn’t loaded into the iframe, and so isn’t available to the textarea.

You can workaround it by using the non-framed editor (which lacks the toolbar buttons), but it may be worth trying the CodeMirror plugin.

Alternately, I think we’d need to add a mechanism for adding stylesheet fragments to the editor iframe.

Best wishes

Jeremy



On 9 Jun 2019, at 20:13, Damon Pritchett <damon.p...@gmail.com> wrote:

Hello again,

I'm having trouble getting my TW to recognize Google fonts. The font family and code font family take the fonts just fine, but I can't get the text editor to do it. I've looked through all of the stylesheets that I know of, but haven't been able to find the smoking gun. I'm embedding the fonts based  on the instructions found here: https://ibnishak.github.io/Tesseract/UI/index.html#How%20to%20use%20google%20fonts%20in%20TW5.

Any thoughts on how to get passed this. Right now, I'm using the generic monospace font, but I would like to use the Roboto Mono font (again, Roboto Mono works find in code font family, but not text editor).

Thanks,

Damon

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5d62431f-5f6d-43e5-b7ca-24b36d73325d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

Damon Pritchett

unread,
Jun 11, 2019, 7:27:03 PM6/11/19
to TiddlyWiki
Thanks. I'll check it out.
Hi Damon
Reply all
Reply to author
Forward
0 new messages