What's the minimum Em size for ttf fonts - fontforge

I'm trying to make a very small pixel font on fontforge, when I set my Em size to 8, the .ttf font generated would not open, giving me an error not a valid font file but changing Em to 16, the font opens fine.
I wonder if there is a minimum Em size for ttf fonts? Or it has something to do with fontforge?

Related

How can i apply Faux Bold to a specific font file(.ttf) manually for generating a new font file(.ttf)

If text is styled as bold or italic and the typeface family does not include a bold or italic font, Editors and IDEs will compensate by trying to create synthetic bold and synthetic italic styles themselves.
This first image show the original font rendering (font is JetBrainsMono-light) in VSCode.
The second image show the faux bold font rendering in VSCode by setting "editor.fontWeight": "bold" in settings.json.
I prefer the faux bold font rendering instead of the original JetBrainsMono-Bold or JetBrainsMono-SemiBold. So, i want to know how to export this kind of font rendering to a .ttf file with the aim of applying the generated font to other editors and IDEs.
Firstly introduce the font file in css
Important:- Convert the ttf to woff and woff2 to eradicate any slightest of issue.
#font-face {
font-family: myFirstFont;
src: url(faux.woff);
}
*Include the woff2 file to in the similar way. (Optional)
And in HTML use the following snippet:
div {
font-family: MyFauxFont;
}
Now accordingly change the font size, weight, color in CSS etc.

Font weight with external font

I'm working with an external font type for my website, I have the 3 ttf files, for normal, bold and italic styles.
I'm wondering if I can change the font weight, because I already tried to use the font-weight CSS property, but it seems that it only works for either normal or bold weight, so I cannot use any weight in between.
Is there any way to use other weight for my font? Do I need to include any extra files?
In short: no, you can't use other weights as is - you'll need more files. You can use normal and bold because you've included normal and bold font files. Other weights will require an accompanying font file as well.
For a visual, check out any of the fonts at Google Fonts: https://www.google.com/fonts
You'll notice there are multiple files, each representing a different font weight (and/or style, such as italic).

How to get CSS font-weight to display?

I am having an issue with the CSS font-weight property. I have set the font-weight to 100, and yet I see no difference from when it was at 600. This has been noticed across multiple websites. It has been observed in Chrome, Chromium, and Firefox on Ubuntu.
I am using Helvetica for the font. I need to make the font lighter.
Is there a work-around for this?
Thanks.
You cannot make a font lighter unless the font has lighter typeface. Helvetica does not. (Neither does Arial, which is what Helvetica is actually mapped to in most computers, namely on Windows systems that lack Helvetica.) Most fonts commonly used on web pages do not.
The font-weight declaration, at least with values less than 400, does not modify anything in fonts. It does not make strokes thinner. Instead, it selects a lighter (or bolder, depending on the value) typeface from a font family when available, i.e. when the font designer has crafted it.
In Google Fonts, there are some nice sans-serif fonts with lighter typefaces, such as Roboto, Open Sans, and Source Sans Pro. Note that 100 is the smallest value of `font-weight, and very few fonts have typefaces that light; normally 300, or sometimes 200, is what you should look for.
Not all fonts have all Font Weights inside of them (MDN).
100, 200, 300, 400, 500, 600, 700, 800, 900
Numeric font weights for fonts that provide more than just normal and bold. If the exact weight given is unavailable, then 600-900 use the closest available darker weight (or, if there is none, the closest available lighter weight), and 100-500 use the closest available lighter weight (or, if there is none, the closest available darker weight). This means that for fonts that provide only normal and bold, 100-500 are normal, and 600-900 are bold.

How can I reduce the size of TTF file?

Am using font face method for my website.For that am using TTF file.The problem am facing is due to the size of TTF file the site loading slowly.So suggest me how to reduce the size of TTF file.Thanks.
You could look into the amount of glyphs you are using in the font and try to reduce it to the absolute necessary ones, the Font Squirrel kit generator, when in Expert Mode, lets you select the symbols you want to use.
Read more at Limit characterset of a Webfont?

What does the :300 mean for this google font?

I have a font loading in my HTML from a web template:
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300' rel='stylesheet' type='text/css'>
What does the ":300" mean and do?
It primarly sets the font-weight for the CSS that is generated. But it also changes the source font-family also.
Ex.
300 - Open Sans Light
600 - Open Sans Semibold
800 - Open Sans Extrabold
Compare your link vs http://fonts.googleapis.com/css?family=Open+Sans:800
Font-weight may be defined as:
normal
Normal font weight. Same as 400.
bold
Bold font weight. Same as 700.
lighter
One font weight lighter than the parent element (among the available weights of the font).
bolder
One font weight darker than the parent element (among the available weights of the font).
Or it can be defined with a numeric representation:
100, 200, 300, 400, 500, 600, 700, 800, 900
Numeric font weights for fonts that provide more than just normal and bold.
If the exact weight given is unavailable, then 600-900 use the closest available darker weight (or, if there is none, the closest available lighter weight), and 100-500 use the closest available lighter weight (or, if there is none, the closest available darker weight).
This means that for fonts that provide only normal and bold, 100-500 are normal, and 600-900 are bold.
To that particular case, the font is being set a bit lighter then the normal boldness.
It's a font weight. 300 is normal weight.
It's in CSS2: http://www.devguru.com/technologies/css/quickref/css_fontweight.html

Resources