How to set default Font and Font Size in Tinymce3.0? - tinymce-3

Not able to change default font and font size. I have tried different methods as following.
content_style: "body { font-size: 14pt; font-family: Arial; }"
this.getDoc().body.style.fontSize = '14px';

I have done a workaround to fix this issue, Please find the following details.
Modified the following file and changed title from 'advanced.fontdefault' to 'Font'.
\tiny_mce\themes\advanced\editor_template.js

Related

How to change font family of entire shiny app?

I am trying to change the font family of my entire shiny app. I found this solution
* { font-family: Arial, sans-serif !important; }
from this url
This is changing every font but also removing my icons.
dashboardSidebar(sidebarMenu(
menuItem("Data", tabName = "dataimport", icon = icon("folder-open"))))
This is how it looks now. It's not working without !important as mentioned in the solution above.
What can I do to fix this?
Can you share the HTML code of the icon? It probably is a span or i tag.
Instead of adding the font-family to every single html element with *, you can add it to the body tag (see the approved answer in your link). Please don't use !important when adding the font-family when it isn't absolutely needed (information about !important in css: What are the implications of using "!important" in CSS?).
If the icon still gets overwritten by you font, you can select the span or i tag in the css and set the font-family to the default font-family with icons.
CSS:
body {
font-family: Arial;
}

How to switch the global font family and update $font-family-base in bootstrap

I have following font-family set on form body:
The font which I have
Now I need following font-family:
The font family I need
This link https://getbootstrap.com/docs/4.0/content/reboot/ tells following :
enter image description here
So according to this link the default dropped and replaced with a “native font stack”.
To switch the global font-family, I need to update $font-family-base and recompile Bootstrap. I am new to bootstrap. Please let me know how to change font-family for my entire form.
html,* {
font-family: '--apple-system','san-serif',
font-size:16px;
}

My custom font is not working

I have tried
#font-face {
font-family: Jua;
src: url('/fonts/jua.ttf');
}
#font-face {
font-family: Jua;
src: url('..../fonts/jua.ttf');
}
#font-face {
font-family: Jua;
src: url('.../fonts/jua.ttf');
}
Im trying to change my body text with.
body,
button,
input,
select,
optgroup,
textarea {
color: #d6d6d6;
font-family: Jua !important;
font-size: 16px;
font-size: 1rem;
line-height: 1.5;
}
Also tried puting the fonts in my theme root directory, Cleared cache
A couple of this you could do.
Check your fonts loads in the browser.
I only see above. So, maybe check your directory permission.
And then check your CSS font path.
Try to add absolute path and check. Then do the path modification.
In your case your src attribute for #font-face should have value url('fonts/jua.ttf') because font file is in directory, which is on the same level as stylesheet file.

Different font settings for editing code and markdown cells in the Jupyter Notebook

In the Jupyter notebook, I would like to use the regular Ubuntu font when editing markdown cells and UbuntuMono for code cells. I can change the fonts of both these cell types simultaneously by editing .jupyter/custom/custom.css like so:
.CodeMirror pre {
font-family: "Ubuntu Mono", monospace;
font-size: 14pt;
}
I can also change the formatting of the headers in the markdown code cells:
.cm-header {
font-size: 110%;
font-family: "Ubuntu";
}
As well as how the text looks when rendered (after executing a markdown cell):
div.text_cell_render {
font-family: "Ubuntu";
font-size: 12pt;
}
However, I don't understand which css classes I could use to discriminate between code cells and paragragh/body text in markdown cells in edit mode. I tried the object inspector in Firefox, but the input text for both cell types show up with the same span tags and css classes. I have tried many of the combinations listed here, but it seems like I just can't find the right one, any ideas?
I received a reply from the Jupyter Notebook issue linked in the comments of my questions here. It is possible to combine CSS selector, so the following solves my problem:
.text_cell .CodeMirror pre {
font-family: "Ubuntu";
font-size: 12pt;
}

Change font of WordPress theme "Zerif Lite"

I'm having trouble changing the font on a website I built using the WordPress theme Zerif Lite.
The page itself is (REMOVED LINK) - I want to change the font in the "testimonial" section or as its displayed there: "Teenused".
That weird font in the bottom of every box (a.client-name)
I have tried so far:
Custom CSS plugin - it lets me only change the font size, when I set new font there, it won't change anything.
Changed the theme's CSS files, also no luck there.
Will appreciate any kind of help.
You can change the font by targeting the correct selector, which is: .feedback-box .client-info .client-name. The current font is called Homemade Apple and is declared in the main theme's CSS file (style.css) at line 2797:
.feedback-box .client-info .client-name {
font-family: 'Homemade Apple', serif;
color: #404040;
}
Simply change that to your desired font, for example:
.feedback-box .client-info .client-name {
font-family: 'Montserrat', sans-serif;
color: #404040;
}
Have you try to add an !important rule to your CSS. It's either that or verify the load order from your styles.
When it comes down to a CSS style, the reason it may not be aplying is because there is another more specific selector, try adding parent selector to your rules, or it could also be that the theme's rules are loading after your rules and replacing them.
One last thing to check, when dealing with fonts: make sure your browser have access to and knows the font. If it does not finds it, it will just replace it with another one, without any warning.

Resources