View Single Post
Old 06-27-2017, 03:32 PM   #4
JustinThought
Groupie
JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.JustinThought ought to be getting tired of karma fortunes by now.
 
JustinThought's Avatar
 
Posts: 171
Karma: 3517858
Join Date: May 2016
Location: Monterrey, Mexico
Device: Samsung Tab-3 7"
Quote:
Originally Posted by theducks View Post
the font family can have the same name
it is the other attributes that must mat ch the usage

font-weight: bold ; usage has a matching @font with the Bold

So, typically, you could have 4 @fonts with the same family,1 for each font style (combination)
Thanks. But no penalty for using a different name, right? Example, I declared the family

@font-face {
font-family: "jour-nal";
font-style: normal;
src: url(../Fonts/myfont-r.ttf);
}
then established a class for that font and style--
.journal {
font-family: jour-nal;
font-size: .95em;
}

(I also made a separate class--

div.journal p {
font-family: jour-nal;
margin-bottom:.55em;
text-indent: .8em;
text-align:justify;
}

to support the container. Possibly redundant, but it gave me a little flexibility on formatting the paragraphs by defining p + p with other attributes in some cases.)

after that, I repeated the process for the italic version--
@font-face {
font-family: "jour-nal-i";
font-style: italic;
src: url(../Fonts/myfont-i.ttf);
}
.journal-i {
font-family: jour-nal-i;
font-size: .95em;
}

and again for the bold.

Not surprisingly, I used that name because I was using the font to reproduce a journal entry, hence the mnemonic name.

--Oh, and that brings up another experiment I tried, which seemed to be effective. I placed that journal entry into a <div class="journal"> container, and when I needed an italic (or bold), I called it thus:

<p>Blah blah, te-dah he haw, and <em class="journal-i">itsibu</em> something else.</p>

--with the same procedure for the bold, using <strong class="journal-b"> instead. My logic here (if such a strong word can be used) was that even if the reader doesn't support the embedded font, it would hopefully still display in italic or bold.

Maybe this is all wet, but this whole procedure evolved from hints I've gotten from the WORKSHOP section here on MobilRead, as well as from reviewing some of the commercial e-books I have.

If it is really messed up, or unnecessary, I'm one of those people who learns best from the second part of "trial-and-error."
JustinThought is offline   Reply With Quote