WatchNon-threaded

Forums » Advanced Editor Forum » Read Message

Talk about it. Ask for help on it. Compliment it.

HTML Question Concerning Fonts

5 months ago
I just tried picking up HTML today so I’m very new to it, but I just tried to use the code to change the font in a story description and it’s not working. I’ve tried fantasy/papyrus, and cursive. Do these fonts specifically not work, or does the coding not work in storygame descriptions?

Edit: Oh, and apostrophes don’t work unless they’re ' and not ‘ ?

HTML Question Concerning Fonts

5 months ago

The usual method of changing fonts is a styled <span> (or similar tag) for a snippet of inline text, or a <style> block for a larger, more automated font change:

<span style="font-family: Vollkorn, Georgia, 'Times New Roman', serif;">Lorem ipsum dolor sit amet…</span>

<!-- OR -->

<style>
body {
    font-family: Vollkorn, Georgia, 'Times New Roman', serif;
}
</style>

Any typeface is fair game, provided the end user has it installed on their system. You can and should specify multiple typefaces (comma separated and quoted is necessary), because there are only a handful of them that are (almost) universally available. At the very least, when you assign a font family you should also specify a generic family to allow the platform to choose an appropriate font as a last resort. Possible generic values are serif, sans-serif, monospace, cursive, and fantasy, but both cursive and fantasy should be used carefully because they vary wildly across platforms.

The encoding on CYS is fickle, so if you want to use certain characters, you'll need to "escape" them with "HTML entities," which are written as an ampersand followed by a text or numerical value and ended with a semicolon. In your case, the entities for ‘single smart quotes’ are &lsquo; and &rsquo;, and “double smart quotes” are &ldquo; and &rdquo;.

HTML Question Concerning Fonts

5 months ago
Alternately, she could recognize that Papyrus is for tools, and not do that.

HTML Question Concerning Fonts

5 months ago

An easy way to get around the weird font stuff is to just use an image with whatever font text you want on it.

HTML Question Concerning Fonts

5 months ago
Best answer, because fancy fonts get really tiring, in my opinion.

HTML Question Concerning Fonts

5 months ago
Okay, I’m going to be honest, you’ve lost me.

The website I found for using html says to put < font face=“whateverfontnamegoeshere” etc to change the font. This way seems to do the same thing, but you specified more fonts and used a different tag. Just when I thought I was beginning to understand html, I hear it from someone who actually knows what they’re talking about.

HTML Question Concerning Fonts

5 months ago
Assuming you're putting the words in between the opening and closing font tags. Other issue is likely your browser isn't supporting the fonts you're trying to use.

HTML Question Concerning Fonts

5 months ago
Alright, so I put in the above example using span, but can I chang the size of the same text? Where would I put that bit of code?

HTML Question Concerning Fonts

5 months ago
Still didn't seem to be working but here's what she's got after some edits. Figure it might be useful for people to actually see it if they're going to help.

HTML Question Concerning Fonts

5 months ago
Oh, thanks! I should’ve thought of that, I didn’t know you could. (you’re an admin then, right?)

HTML Question Concerning Fonts

5 months ago

<span style="font-family: Papyrus, Palatino, 'Palatino Linotype', serif; font-size: 1.5em;"><u>You are a wolf.</u></span>

That stray closing </font> tag should be gotten rid of. The typefaces should be listed from most to least desired; in this case if you're sticking with Papyrus, Palatino isn't a great match, but it's the most similar of the "web safe" fonts IMO. I don't trust the "fantasy" fallback so I'd replace it with "serif."

To change font size, you just add a "font-size" property to the style and separate it from "font-family" with a semicolon. The value I provided, 1.5em, means 1.5 times the size of the surrounding text, but there are other units you can use. 24px, for instance, if you want to set the size to something exact instead of relative.

HTML Question Concerning Fonts

5 months ago
Thank you! For future reference, if I wanted to change the size to be bigger, I would replace 1.5em with, say, 2em to make it two times bigger, right? And if I wanted to change the text color, I would add it in the same way as you added font-size, using a semicolon to seperate it?

HTML Question Concerning Fonts

5 months ago

Yep. The property for text color is simply "color" by the way. There's a set of color names, but you can also use hex values, so "color: red;" and "color: #FF0000;" are both equally valid.