Page 1 of 2

Need help with italics

Posted: Fri Nov 17, 2006 3:23 pm
by Watercolorheart
Hello, I have been using Deja Vu Sans, but I have a problem with it: the italic looks oddly spaced.

Does anyone know of an open-source/open-use font with an attractive italic and bold settings? It needs to simple, legible, and not eye-catching at all.

Something like Times New Roman or Courier New, but able to be freely distributed.

Posted: Fri Nov 17, 2006 3:30 pm
by Alessio
Sounds very familiar... check the italic font in this topic.

Posted: Fri Nov 17, 2006 3:32 pm
by SolarSnake
PyTom would be able to tell you more about this, but if you don't find anything suitable and don't mind a bit of work, you might be able to statically render the non-free font that you want into a bitmapped sfont and use that. Copyright law doesn't allow one to copyright bitmapped fonts (true type fonts are a different story entirely, but if you're dedicated it does work to render a true type font (that you have legal access to) out into bitmaps and then use those.

That's probably several hours of work, and I assume that there's a better option (i.e. a free font that looks good), but I wanted to mention this as a back-against-the-wall option.

Just a personality trait, I think, but I always like to try to establish what my worst case scenario is, so I have a sense of what to realistically expect. I find I worry less this way, because the worst case scenario is usually better than I would expect. Your mileage may vary. :)

Posted: Fri Nov 17, 2006 3:32 pm
by Watercolorheart
Oh, thanks ... (I should have done a search on "italics" first, should have known it would be a common problem ... )

Completely unrelated, there was an older topic dealing with how to make Ren'Py emulate a Choose-Your-Own-Adventure style game with LOTS of multiple choices and variables and I was thinking about that ...

Some code was posted, and now I can't find it. :(

---

Sorry, I started writing before you but I posted afterward. I know about the SFont route, and the time and effort required to make one and it's like ... D: ... I was hoping for a ready-made solution.

---

Actually, I'll try out the oblique and see how that goes. It also reminded me I had some other fonts on another game folder that I haven't tried out that were licensed for free use for nonprofit things and such.

Posted: Sat Nov 18, 2006 12:57 am
by dizzcity
Oh, and in case you should ever find yourself lacking in fonts again, go here: http://www.1001freefonts.com/ (although they're well over 4,000 fonts by now...). Almost all of them are completely free-to-use, with a small portion shareware.

-Dizzy-

Posted: Sat Nov 18, 2006 5:47 am
by monele
Completely unrelated, there was an older topic dealing with how to make Ren'Py emulate a Choose-Your-Own-Adventure style game with LOTS of multiple choices and variables and I was thinking about that ...
I'm intrigued... what kind of specific code could there be ? Wouldn't just... putting multiple choices be enough ? What did the specific code add?

Posted: Sat Nov 18, 2006 4:14 pm
by Watercolorheart
Ah, well, it just showed how to do it and generate different responses for clicking the same option twice.

Also, I usually don't program variables so I sorta forgot how to do that on such a massive scale. :(

Posted: Sat Nov 18, 2006 4:38 pm
by dizzcity
Actually, I'm kind of working on a similar project to that, as part of my Interactive Storytelling project. Once I get the basic thing outlined, I can release the plot skeleton on these forums for more work and comments before actually filling in the details. It's quite an interesting way of doing stuff, I think.

-Dizzy-

Posted: Sat Nov 18, 2006 7:57 pm
by SolarSnake
BCS,

Do you mean something like:

Code: Select all


$ choice1var = 0
$ choice3var = 0
menuStartLabel:
menu:
    "Choice 1":
        if choice1var == 0:
            "I am chosing choice 1, an option I have never chosen before"
        elif choice1var == 1:
            "I have previously entered choice 1, but only once"
        elif choice1var == 2:
            "I have chosen choice 1 twice"
        else:
            "I have chosen choice 1 so many times there is no point to saying how many"
        $ choice1var = choice1var + 1
    "Choice 2":
        "The second path I can take never varies -- it is reliable, like chocolate."
    "Choice 3":
        if choice1var > 0:
            if choice3var > 0:
                "I've chosen both choice 1 and choice 3 before"
            else:
                "I've chosen choice 1 before, but this is my first time choosing 3"
        else:
            if choice3var > 0:
                "I've chosen choice 3 before, but never choice 1"
            else:
                "While I may have chosen choice 2 before, this is otherwise my first choice"
        $ choice3var = choice3var + 1

jump menuStartLabel

(Note: the above example has been edited for better completeness.)

Posted: Sat Nov 18, 2006 9:56 pm
by Watercolorheart
Yes, that's sort of what I meant.

......

I didn't understand any of that, even though it's commented. *cry*

How is the menu system distinguishing between the choices?

Posted: Sat Nov 18, 2006 10:36 pm
by SolarSnake
BCS,

Ok, first question: do you understand the way that indentation is used in renpy (and python) to indicate which parts go with what?

Posted: Sun Nov 19, 2006 4:49 pm
by Watercolorheart
Yes, I do.

I've been programming in Ren'Py for quite a while.

What confuses me is that the x + 1 and stuff, I'm not seeing how it determines ... unless, does x stand for "how many times this option has been clicked?"

I don't get what the "if choice# > 0" means either.

Posted: Sun Nov 19, 2006 5:50 pm
by monele
choice1 and choice3 are "variables". Basically, a value you keep for later so you can test it.

The idea is indeed to store how many times each choice has been picked. You just choose two variables to store this in this case.

Later on, you can test the value, as if you asked "how many times have we picked the first choice ?"... or more precisely, "have we picked the first choice two times already ?". This translates to : choice1 == 2.

As for "choice1 = choice1 + 1", it means : "let's remember that we have picked the first choice one more time" (the current number of times plus one).

Another example outside of Ren'Py could be remembering Life Points... as in RPGs.

Code: Select all

hp = 100 # we remember that we have 100 hit points
hp = hp + 20 # whatever our current hit points, we add 20 points to them.

if hp > 50:
    "I have more than 50 hit points!"

Posted: Sun Nov 19, 2006 6:11 pm
by Haeleth
SolarSnake wrote:Copyright law doesn't allow one to copyright bitmapped fonts
...in the USA. The situation is not necessarily the same everywhere, and individual font EULAs often quite legitimately add additional restrictions above and beyond basic copyright law, so proceed with caution.

Posted: Sun Nov 19, 2006 7:49 pm
by SolarSnake
BCS,

No offense intended. You weren't very specific about which part you wanted explained, and when people aren't explicit I tend to start from the beginning.

I think that monele gave a good explanation of variables, so I won't rehash that. I just want to point out that I edited my example to try to make it a little clearer what's going on and how it would be used. Does that help any?