Problem with font-family in .css file using Atom - html

I'm using Atom 1.45.0 x64 on Linux Mint19.3 Cinnamon to learn basics of web development (I'm following a course of html5, CSS and JavaScript).
I have 2 problems (probably related to each other):
whenever I type the 'font-family' command in my .CSS file the only input suggestions I get are the ones you can see in the screenshot I uploded here. No way to specify other fonts;
whenever I choose one of the available options, the fonts in my html page won't change (and it's not because of typos, bad linking between html and css files, etc).
fonts currently available on my Atom
I haven't been able to find a solution to this problem and I can't figure it out on my own because I'm not an advanced user of Linux systems. I've also installed the 'fonts' package on Atom but that hasn't solved the problem.
Any suggestion?

It seems the problem affects Atom. Try to change from font-family to font-style and declare the value. So instead of doing font-family: italic try typing font-style: italic;
Found similar problem here, even if it's using Windows 10: https://discuss.atom.io/t/why-cant-i-change-the-font-problem-solved-the-answer-is-inside/21086
Comment if can't resolve.

Related

Directly embedding the woff font into blogger

I am absolutely a novice in the field of html / css programming. I have a font file with extension .woff etc. I know, I may upload it on a server and later on use it with the help of css files generated from tools like fontsquirrel. However, I want to explore the option of getting the font into simple html or css codes so that I may use it on forums like blogger without having to host the font file elsewhere. Is it technically possible? Thank you.

Adding multiple ttf fonts to HTML2PDF and switching between them via css

I am using HTML2PDF and so far am having great results. I have stumbled upon a problem that I am wasting lots of time trying to solve.
I am using HTML2PDF v4.0 and I have managed to set the default font for my PDF's to a ttf font that I converted (into 3 files, .z .php and .ufm) These files were placed into the TCPDF fonts directory and the system recognizes them and the final PDF is generating with the correct font.
Now, the style guide I am working from specifies 2 different fonts. I need to use ANOTHER ttf font (also converted and placed into the TCPDF folder and verified by setting it as the default font)
I am having trouble finding a strategy for implementing this scenario into HTML2PDF. I am about to go down the road of splitting the ob_start() buffering into sections for each required font, then re-setting the font between outputs. A simple CSS class would be so much easier but I am unable to get this to work as expected.
After half a day of head scratching over this I managed to finally get it to work.
I have converted both of the ttf fonts using the web utility I mentioned in the question above. Then I was able to set a default font for the whole page using
$html2pdf->setDefaultFont("helvetica45light");
Then when I need to use the other font I just set an inline style similar to the following
<span style="font-family:helvetica65medium">some text here</span>
I went 1 step further, and created the classes as I was originally hoping for.
<style>
.helvetica65medium{
font-family:helvetica65medium;
}
.helvetica45light{
font-family:helvetica45light;
}
</style>
now I can just set the class of the text that I want in either of the defined fonts.
I guess I will count that as a lesson learnt

Using GeoGebra's font from github in an HTML tutorial

I am putting together a tutorial (in .html) on how to use GeoGebra, and I would like to have a css style for the text in my tutorial that will be GGB commands. I would like this to match what GGB uses in its input lines. In other words, I would like the text in my lessons denoting GeoGebra input to look identical (in font, size, etc) as the input when using GeoGebra.
Is there a way (in my css file, or in the header of each html file) that would automatically grab the right font that the current release of GGB uses from GGB's repository on github?
They appear to currently be using unmodified (maybe just stripped of unused characters?) versions of Roboto and Roboto Slab (specifically the regular weights of each), which you could use through Google Fonts. Downloading and opening 'Geogebra Serif Regular' from their GitHub repo opens a font file literally just named "Roboto Slab".
You may be able to hotlink to their github files for their sans and serif fonts, though if you are selling these tutorials it appears that you might be in violation of their license, were you to use these exact files.
Seeing as they seem to move their fonts around a fair bit in their folder structure, and rename the files occasionally, I don't think that there is a guaranteed method to pull "whatever font they happen to be using" from their GitHub in any sort of futureproofed way -- if you hardcode those above links, your own fonts may (and eventually will) spontaneously stop working whenever they decide to shunt folders around.
I surmise that the easiest way for you to match their look-and-feel for the near future would be to simply use Roboto / Roboto Slab via Google Fonts.
AFAIK, these are the only fonts they use in the app.

Using custom fonts in Swing application

I have two specific fonts installed on my computer and would like to configure the JRE to make them
available to my application, specifically Calibri and Cambria Math. However, I understand the basics of how default fonts work in Java; how the JRE reads a properties file that sets the default fonts for any Java application running on top of it.
However, these two fonts are not available in any of the properties files that I can find. So:
(1) Is it possible to "add" these two new fonts to the JRE's config, so that in my program I can call myJButton.setFont(myCambriaMathFont) on a component and make use of these added fonts? If so, how? If not, then:
(2) Are there any libraries/JARs out there for matching font names/font families to the fonts available via the JRE, and matching them as close as possible, algorithmically?
C'mon, I know you'd all love to see what a JList looks like....on Wingdings!!!
Thanks and sorry for this quirky question.
Would you like to load the font at runtime?
See Font.createFont(...)

Phpstorm Editor fonts on linux systems

So tired to search solution..
I use PHPStorm IDE for my php projects and one trouble just makes me crazy.
Editor fonts (editor, don't care about interface) looks horrible. I've tried on different distributions and different DE but result is always the same :(
There are screenshots to compare Kate and PHPStorm fonts. I know that PHPStorm is an JAVA application and it uses different font hitting engine, but.. Eclipse is an JAVA app too, but has pretty nice fonts.
PHPStorm fonts on both Windows and OSX looks like other system fonts. Smooth and readable.
Is there way to fix this font issue before my eyes will explode..?
Thanks.
Following the PhpStorm issue, here is what I added to phpstorm64.vmoptions (that I have installed in /usr/local/bin/PhpStorm/bin/):
-Dswing.aatext=true
-Dawt.useSystemAAFontSettings=gasp
-Dsun.java2d.xrender=true
I also did the trick of opening the font in FontForge:
Ctrl+A (select all chars)
Hints -> Clear Hints
Hints -> Clear Instructions
File -> Generate Font
I put it in ~/fonts/
I am running Ubuntu 12.10 and after all that, everything looks quite great (I did it for Ubuntu Mono).
The only problem I noticed is that -Dawt.useSystemAAFontSettings=gasp leads to great editor font rendering, but poor rendering for menus and other stuffs. Whereas -Dawt.useSystemAAFontSettings=lcd gives awesome font rendering for menus, but less good font rendering in the editor. So try both and pick the one you prefer.
Update: on Ubuntu 13.10, I have no problem anymore.
This is Linux specific issue, you can find a lot of information on this problem here. Check the comments for various suggestions and workarounds.
Here is what you can get with just a different font:
You can install infinality patches and patch OpenJDK to make it use freetype for fonts rendering.
Here are links about installing infinality and patched OpenJDK for Ubuntu-based distributions:
http://www.webupd8.org/2013/06/better-font-rendering-in-linux-with.html
http://www.webupd8.org/2013/06/install-openjdk-patched-with-font-fixes.html
And here is my screenshot of PHPStorm running on Fedora 20 with infinality and patched OpenJDK:
Try adding -Dawt.useSystemAAFontSettings=lcd to bin/phpstorm.vmoptions
Try Settings -> Editor -> Appearance -> Use anti-aliased font
The best solution I've found is to use FontForge.
FontForge it's a linux application which allows you to edit some font preferences.
Just open ttf font within app.
Press ctrl+a to select all chars. Then choose from menu Hints -> Clear Hints. Then Hints -> Clear Instructions. And last File -> Generate Fonts. Just save the new font as new or replace existing and try to use this font with PhpStorm. Looks not ideal but much better than before.
Also I've noticed that fonts on a dark background looks pretty good in Linux
Comparing NetBeans and PhpStorm side by side on my Debian-Squeeze box and I found NetBeans looked much better even when the same font and font-size was selected. The difference was that PhpStorm had bolded most of the code. After going through the editor configuration and getting rid of all the bolding the editor looks much better now.
Monospaced with anti-aliasing looks good to me for WebStorm.