|
Post by otheredgeworth on Oct 6, 2023 8:00:55 GMT
First time poster, so if this should actually belong in Other Games, mods feel free to move it.
I am working on a template for Oath custom cards using the development kit the game creator has provided. Would it be simpler to just make a Photoshop/Paint.net/GIMP/etc. project for each card type with all the provided images as individual layers? Probably. But I thought that it would be a simple enough template for dipping my toes into the water of template creation.
I have been making good progress but have hit a sticking point. The thing I am having issue with is, as per the thread title, putting more than one font into a single textbox. Oath uses a different font for capital letters in the names of Denizen/Edifice cards. I have made a script that will selectively bold capital letters in the name, so locating the letter to apply the formatting should not be an issue, it is applying it.
Now, I figure that this could be achieved by making a symbol font using the actual font, but that seems like a lot of painstaking work if there was another, simpler means to achieve this. Unfortunately, I have not found said means. There does not seem to be a capitals equivalent to the italics font property, and while the size and colour is adjustable by tag, the font itself does not seem to be (at least, I have not found documentation or a thread indicating what the appropriate tag to do so is).
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Oct 6, 2023 11:51:03 GMT
Symbol font seems like the correct way to go.
If you don't ever plan on having italic text in these fields, you could hijack the italic font (it doesn't actually need to be italic), but that seems hacky.
|
|
|
Post by otheredgeworth on Oct 7, 2023 1:23:32 GMT
Thanks GenevensiS, using the italic font is the kind of quick and dirty workaround I was looking for. It may not be the intended use, but it'll do for now and future-me can deal with making a symbol font if/when I need italics in the card names.
Along the same lines, I can see I am going to have an issue to face in the future, and I don't think I will be able to avoid symbol font solution. On some cards, there use small capitals to emphasis the timing of the ability i.e. it is your action for turn (Action), or it happens automatically when the card is played (When played), or automatically at the end of the turn (Rest). Here is an example of each:
Now, as these examples demonstrate, I already need a symbol font the game resources (favour/coins and secrets/books). I also can't get away with using the italics font trick as cards sometimes (rarely) need italics as a reminder/clarification to the ability. I guess what I want to figure out is one of the following: - Is it possible to do small caps amongst other text with tags or some other trick of formatting to avoid having to make the timing words symbols?
- If making the timing words symbols, how would I make them shrink in the same manner as the text if it needs to become smaller to fit the textbox? And for that matter, can I make text reduce in font size rather than just squishing?
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Oct 7, 2023 10:51:24 GMT
Okay I think I have the perfect solution for you.
Small Caps are actually a different font altogether, so you are basically facing the same problem as before. However, a font file can contain thousands upon thousands of symbols. In particular, it contains a copy of latin letters called the Fullwidth Latin letters. In the Goudy Old Style Regular font, these are unused. So I opened the font file in Font Forge, and copied the stylized capitals from Goudy Lombardic in the Fullwidth Latin capitals, then copied the small caps from Goudy Old Style Small Caps in the Fullwidth Latin lower cases, to produce this Frankenstein of a font file:
which contains everything you need. This will replace Goudy Old Style Regular upon installation, but it's basically the same font with added symbols. Now, by adding the 3 function definitions here in your game files:
you can switch parts of the text at will between the 3 forms.
As for fonts and symbol fonts scaling down, it is done by adding the "scale down to" property:
text field: font: name: Goudy Old Style size: 15 scale down to: 10 symbol font: name: oath-symbols size: 15 scale down to: 10
|
|