Fonts: Difference between revisions

2,927 bytes added ,  18 July 2017
no edit summary
No edit summary
No edit summary
Line 1: Line 1:


<span style="color: red; font-size:200%;">THIS PAGE IS BEING REWRITTEN TO MAKE IT SIMPLER</span><br/>
<span style="color: red; font-size:200%;">THIS PAGE IS BEING REWRITTEN TO MAKE IT SIMPLER</span><br/>
<big>THE ORIGINAL CONTENT OF THIS PAGE IS STILL AVAILABLE HERE: [[Fonts_deprecated_methods]]</big><br/><br/><br/><br/>
 


Preliminary remark: for demonstration purposes, this page makes use of special characters. This wiki page is supposed to be encoded in Unicode (UTF-8), therefore, you should see all the special characters correctly.
Preliminary remark: for demonstration purposes, this page makes use of special characters. This wiki page is supposed to be encoded in Unicode (UTF-8), therefore, you should see all the special characters correctly.
Line 11: Line 11:
This page is meant to provide '''in-depth explanations''' about how AGS manages fonts, and how to create fonts for AGS.
This page is meant to provide '''in-depth explanations''' about how AGS manages fonts, and how to create fonts for AGS.


If you only want to read the short version, read [[Tutorial_Part_9_-_Cursors_and_fonts#Fonts|this]].
* If you only want to read the ''short'' version, then read [[Tutorial_Part_9_-_Cursors_and_fonts#Fonts|this]].
* There is a ''much more complicated'' version of this article [[Fonts_deprecated_methods|here]]. It was written ''before'' AGS 3.4 was available. If you want to dig into ''old'' tricks to use 256 characters in games, or maybe adapt them to use much more characters, then that article might be useful.
 
 
== Recap on AGS versions capabilities ==
 
* '''AGS 3.2 and 3.3''' - From memory, these versions don't support 256-characters fonts. You'll need to use the custom AGS brand '''"AGS Draconian edition"''' (you can find it by searching the forums)
* '''AGS 3.4 to 3.4 Patch 3'''- They do support 256-characters fonts in-game, but you can't see it in the "Fonts" pane in the Editor. Also, the fonts shipped by default are still only 128 characters.
* '''AGS 3.4 Patch 4''' - This version is fully 256-characters capable -- it supports 256-characters fonts in-game, and allows you to view 256-characters fonts in the Editor's "Fonts" pane, ''but'' the fonts shipped by default are still only 128 characters. You can easily replace them with their 256-characters counterpart though.
* '''AGS 3.4 Patch 5''' - This version is fully 256-characters capable, and might (hopefully) embed the 256-characters fonts.''' See the discussion on this topic [[http://www.adventuregamestudio.co.uk/forums/index.php?topic=48798.msg636566332#msg636566332|here]].




Line 19: Line 28:




=== >> Language ===
===<span style="font-size:120%; color:red;">Language</span>===
:'''Do I want my game to be:'''
:'''Do I want my game to be:'''
::'''a.''' '''In''' '''English only'''?
::'''a. In English only ?'''
::'''b. In some language that uses a handful of special characters '''(for example: accented Latin letters, as in German, French, Spanish, Polish...)
::'''b. In one of the "Western European" languages?''' (German, French, Spanish, ...)
::'''c. In some language that uses slightly more special characters '''(for example: Cyrillic alphabet -- Russian, Bulgarian, etc.)
::'''c. In one of the "Central European" or "Eastern European" languages?''' (for example: Croatian, Czech, Hungarian, ... )
::'''d.''' In an alphabet with much '''more letters'''? (Japanese, Chinese...)
::'''d. In Cyrillic alphabet?''' ( Russian, Bulgarian, ...)
::'''e. In Japanese''' or any ideograms-based language with a ''moderate'' number of signs ? ( Japanese, ...)
::'''f. In an alphabet with ''much more'' letters or ideograms'''? (Chinese, Farsi/Persian...)
::'''g. A right-to-left language?''' (Arabic, Hebrew...)




Line 32: Line 44:
* If the answer is '''"b"''', then you need to consider searching/creating fonts that will allow the special characters you need, such as : Spanish ('''áéíóúüñ''', etc.), German ('''öäß''', etc.), French ('''àâêéèëûîïç''', etc.). BUT the good news is, those three common languages fit together in a character table of just 256 characters. This document will explain how to do.
* If the answer is '''"b"''', then you need to consider searching/creating fonts that will allow the special characters you need, such as : Spanish ('''áéíóúüñ''', etc.), German ('''öäß''', etc.), French ('''àâêéèëûîïç''', etc.). BUT the good news is, those three common languages fit together in a character table of just 256 characters. This document will explain how to do.


* If the answer is '''"c"''', then you need to consider searching/creating fonts that will allow the special characters you need. Unlike situation "b", Cyrillic alphabet needs the whole 256 characters page to fit in, so you'll need a font just for that alphabet. But still, it shouldn't be too hard.  
* If the answer is '''"c"''', then you have the same needs as "b", except this set of character is less common in pixel fonts. You might have to start from a "Western Europe" 256-characters font and redraw the special characters you need.


* If the answer is '''"d"''', then AGS wasn't really designed for your needs. There are workarounds, but they are outside of the scope of this document. You can try the engine plugin "[http://www.adventuregamestudio.co.uk/forums/index.php?topic=52207.msg636514064#msg636514064 AGSBMFontRenderer]" (not tested). You might find some clues [https://www.adventuregamestudio.co.uk/forums/index.php?topic=54570.msg636555760 here] if you're targetting '''Farsi/Persian'''.  
* If the answer is '''"d"''', then you need to consider searching/creating fonts that will allow the special characters you need. Unlike situation "b" and "c", Cyrillic alphabet does not only fill the "unused" extra 128 characters while leaving the first 128 characters untouched. It needs the whole 256 characters page to fit in, so you'll need a font just for the cyrillic alphabet. But still, it works fundamentally the same way as other 256-characters fonts.
 
* If the answer is '''"e"''', then this alphabet is a bit peculiar because there are thousands of kanjis BUT Japanese also has a basic set of about 60 to 200 characters that lets you write in phonetic syllables. The basic 50-something characters are the "katanaka" (see a pixel font here : https://www.colourbox.com/vector/pixel-japanese-katakana-vector-18520378 ). You'd be probbaly more comfortable with some extra characters, that make it up to about 200. It means it all fits in a 256-characters font, just like cyrillic alphabet (above). PLEASE NOTE: the author of this article is not an expert on the topic. Please feel free to correct me [[http://www.adventuregamestudio.co.uk/forums/index.php?topic=55022.msg636566116#msg636566116|here]]
 
* If the answer is '''"f"''', then AGS wasn't really designed for your needs. There are (probably) workarounds, but they are outside of the scope of this document. You can try the engine plugin "[http://www.adventuregamestudio.co.uk/forums/index.php?topic=52207.msg636514064#msg636514064 AGSBMFontRenderer]" (not tested). You might find some clues [https://www.adventuregamestudio.co.uk/forums/index.php?topic=54570.msg636555760 here] if you're targetting '''Farsi/Persian'''.  
Read further to know how to create fonts.
Read further to know how to create fonts.


=== >> Resolution ===
* If the answer is '''"g"''', then, (provided your alphabet fits in a 256-characters font, just like cyrillic or Japanese above), all you need to do is to enable the option to revert the text display. Use function SetGameOption or change the setting in the General game settings.
 
===<span style="font-size:120%; color:red;">Resolution</span>===
:'''Do I want my game to be:'''
:'''Do I want my game to be:'''
::'''a.''' '''high-resolution'''?
::'''a.''' '''high-resolution'''?
132

edits