diff options
author | antoniou79 | 2019-01-04 14:07:16 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-01-06 17:12:02 +0100 |
commit | 49497bfb4aff36f20ccb31e951335dc11348e652 (patch) | |
tree | 20d8a3032422a93ec73e52f1b182d3066a99575d | |
parent | de8bb16b9ddf0813fe73ac1b0dce02ee04c1ec4d (diff) | |
download | scummvm-rg350-49497bfb4aff36f20ccb31e951335dc11348e652.tar.gz scummvm-rg350-49497bfb4aff36f20ccb31e951335dc11348e652.tar.bz2 scummvm-rg350-49497bfb4aff36f20ccb31e951335dc11348e652.zip |
DEVTOOLS: Updated readme details on MIXResourceCreator
6 files changed, 44 insertions, 17 deletions
diff --git a/devtools/create_bladerunner/subtitles/README.md b/devtools/create_bladerunner/subtitles/README.md index 0054e09a6c..daa5a405ad 100644 --- a/devtools/create_bladerunner/subtitles/README.md +++ b/devtools/create_bladerunner/subtitles/README.md @@ -64,14 +64,23 @@ Syntax Notes: 5. The "--trace" optional switch enables extra debug messages to be printed. The __text configuration file "configureFontsTranslation.txt"__ a __text file that should be saved in a UTF-8 encoding (no BOM)__, that contains the following: -1. A key "targetEncoding" with a value of the name of the ASCII codepage that should be used for the character fonts (eg windows-1253). -2. Multiple lines with the key "fontNameAndOutOfOrderGlyphs" and a value that contains: - * the name of a in-game Font file that should be included in the SUBTITLES.MIX - * a '#' character after the font name - * a list of comma separated tuples that specify the mapping of special (out of order) character (see fontCreator) to placeholder characters from the selected codepage. - * eg. fontNameAndOutOfOrderGlyphs=SUBTLS_E#í:Ά,ñ:¥,â:¦,é:§,Ά:£ - - +1. Multiple lines (practically one per imported Font type) with the key "fontNameAndOutOfOrderGlyphs" and a '#'-separated value that contains: + * the name of an in-game Font "type" that will be included in the SUBTITLES.MIX resource archive. You could also have lines for Font "types" not imported in the SUBTITLES.MIX, but are already Font types used by the game (eg. KIA6PT) especially when you intend to add translated/ updated TRx files in the SUBTITLES.MIX (however even in that case, there are default settings for those fonts that the script will use if you don't specify alternative settings in this file to override them). Valid values can be: SUBTLS_E (for all subtitles), KIA6PT, TAHOMA (for both TAHOMA18 and TAHOMA24), SYSTEM (this is basically for the ERRORMSG.TRx). + * a '#' character after the font type + * the name of the 8-bit string encoding (codepage) (eg. cp437 or windows-1252) that should be used to store the texts that uses this particular font "type" in the game's TRx text resource files. Valid values can be the standard encodings listed in python's page: + https://docs.python.org/2.7/library/codecs.html#standard-encodings + * a '#' character after the target Encoding + * a list of comma separated tuples that specify the mapping of special (out of order) character to placeholder characters from the selected codepage. See fontCreator section for more details on this. + * eg. + ```` + fontNameAndOutOfOrderGlyphs=SUBTLS_E#windows-1253#í:Ά,ñ:¥,â:¦,é:§,Ά:£ + fontNameAndOutOfOrderGlyphs=KIA6PT#cp437# + fontNameAndOutOfOrderGlyphs=TAHOMA#cp437# + fontNameAndOutOfOrderGlyphs=SYSTEM#latin-1# + ```` + * Note: for font files (FON) that you have created or edited with the fontCreator tool (e.g for the SUBTLS_E file for subtitles, or another in-game font file eg. KIA6PT, TAHOMA) you __should__ copy the 8-bit encoding and the comma separated out of order character tuples from the respective "override encoding" text file that you used with the fontCreator tool for each new/ edited font. Additionally, all the new and edited fonts (FON files that were output by the fontCreator script) should be in your working directory in order to include them in the SUBTITLES.MIX. It's important to keep the naming of those files unchanged. __Supported name values for imported FON files__ are: + SUBTLS_E.FON, KIA6PT.FON, TAHOMA18.FON, TAHOMA24.FON and SYSTEM.FON (practically you won't be using the last one). + ## fontCreator (fontCreator.py) (requires python Image library *PIL*) A tool to support __both__ the exporting of fonts from the game (to PNG images) __and__ the creation of a font file (FON) in order to resolve various issues with the available fonts (included in the game's own resource files). These issues include alignment, kerning, corrupted format, limited charset and unsupported characters -- especially for languages with too many non-Latin symbols in their alphabet. @@ -86,7 +95,8 @@ python2.7 fontCreator.py -im imageRowPNGFilename -om targetFONfilename [-oe path ``` This tool __requires an override encoding text file__ in its Syntax B mode (subtitle font creation). You can specify the path to this file after a "-oe" switch. If you don't provide this path, the script will search for an "overrideEncoding.txt" file in the current working directory. The override encoding file is a __text file that should be saved in a UTF-8 encoding (no BOM)__, that contains the following: -1. A key "targetEncoding" with a value of the name of the ASCII codepage that should be used for the character fonts (eg windows-1253). +1. A key "targetEncoding" with a value of the name of the ASCII codepage (8-bit encoding) that should be used for the character fonts (eg windows-1253). Valid values can be the standard encodings listed in python's page: + https://docs.python.org/2.7/library/codecs.html#standard-encodings 2. A key "asciiCharList" with value the "all-characters" string with all the printable characters that will be used in-game, from the specified codepage. Keep in mind that: * The first such character (typically this is the '!' character) should be repeated twice! * All characters must belong to the specified codepage. diff --git a/devtools/create_bladerunner/subtitles/fontCreator/samples/SampleCMDExportFonts.txt b/devtools/create_bladerunner/subtitles/fontCreator/samples/SampleCMDExportFonts.txt new file mode 100644 index 0000000000..b80fad37e5 --- /dev/null +++ b/devtools/create_bladerunner/subtitles/fontCreator/samples/SampleCMDExportFonts.txt @@ -0,0 +1 @@ +python2.7 fontCreator.py -ip /d/Westwood/BladeRunnerENG
\ No newline at end of file diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py index e55d2da495..800032a5c0 100644 --- a/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py +++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/packBladeRunnerMIXFromPCTLKXLS04.py @@ -117,8 +117,8 @@ SUPPORTED_TRANSLATION_SHEETS = [('OPTIONS.TR', 'KIA6PT'), # The FON files that are identically named to the originals are supposed to override them (needs ScummVM compatible functionality for that) # We don't deal with 10PT.FON since it's not used. # Also we don't deal with the SYSTEM (external OS font) that ERRORMSG.TRx uses! -# TODO we probably could skip importing ERRORMSG.TRx (to SUBTITLES.MIX) altogether, since translating that has no point! -SUPPORTED_OTHER_FILES_FOR_MIX = [DEFAULT_SUBTITLES_FONT_NAME, 'KIA6PT.FON', 'TAHOMA18.FON', 'TAHOMA24.FON'] +# TODO we probably could skip importing ERRORMSG.TRx (to SUBTITLES.MIX) altogether, since translating that has no point! In that case SYSTEM.FON should be removed from here since it's currently of no use otherwise and support for it is not really required... +SUPPORTED_OTHER_FILES_FOR_MIX = [DEFAULT_SUBTITLES_FONT_NAME, 'KIA6PT.FON', 'TAHOMA18.FON', 'TAHOMA24.FON', 'SYSTEM.FON'] SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST = [('EN_ANY', 'E', 'English'), ('DE_DEU', 'G', 'German'), ('FR_FRA', 'F', 'French'), ('IT_ITA', 'I', 'Italian'), ('ES_ESP', 'S', 'Spanish'), ('RU_RUS', 'R', 'Russian')] DEFAULT_LANG_DESC_CODE = SUPPORTED_LANGUAGES_DESCRIPTION_CODE_TLIST[0] diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/configureFontsTranslation.txt b/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/configureFontsTranslation.txt index 8b4a355ecb..52db87201b 100644 --- a/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/configureFontsTranslation.txt +++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/configureFontsTranslation.txt @@ -1,4 +1,4 @@ -targetEncoding=windows-1253 -fontNameAndOutOfOrderGlyphs=SUBTLS_E#í:Ά,ñ:¥,â:¦,é:§,Ά:£ -fontNameAndOutOfOrderGlyphs=KIA6PT#é:ƒ,ü:– -fontNameAndOutOfOrderGlyphs=TAHOMA#é:ƒ,ü:–
\ No newline at end of file +fontNameAndOutOfOrderGlyphs=SUBTLS_E#windows-1253#í:Ά,ñ:¥,â:¦,é:§,Ά:£ +fontNameAndOutOfOrderGlyphs=KIA6PT#cp437# +fontNameAndOutOfOrderGlyphs=TAHOMA#cp437# +fontNameAndOutOfOrderGlyphs=SYSTEM#latin-1#
\ No newline at end of file diff --git a/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/sampleCMDParameters.txt b/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/sampleCMDParameters.txt index aa13e41a83..35ebd0f4c8 100644 --- a/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/sampleCMDParameters.txt +++ b/devtools/create_bladerunner/subtitles/mixResourceCreator/samples/sampleCMDParameters.txt @@ -1 +1,9 @@ -python2.7 mixResourceCreator.py -x ../sampleInput/englishTranscript.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld EN_ANY --trace
\ No newline at end of file +python2.7 mixResourceCreator.py -x ../sampleInput/englishTranscript.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld EN_ANY --trace + +python2.7 mixResourceCreator.py -x ../sampleInput/out-GermanFull.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld DE_DEU + +python2.7 mixResourceCreator.py -x ../sampleInput/out-FrenchFull.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld FR_FRA + +python2.7 mixResourceCreator.py -x ../sampleInput/out-ItalianFull.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld IT_ITA + +python2.7 mixResourceCreator.py -x ../sampleInput/out-SpanishFull.xls -ian ../common/actornames.txt -cft ../sampleInput/configureFontsTranslation.txt -ld ES_ESP diff --git a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/samples/sampleCMDParameters.txt b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/samples/sampleCMDParameters.txt index 0f0d81db2e..02e4c6b13d 100644 --- a/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/samples/sampleCMDParameters.txt +++ b/devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/samples/sampleCMDParameters.txt @@ -1 +1,9 @@ -python2.7 quoteSpreadsheetCreator.py -op /d/BladeRunnerLPBackup/ENG_data/WAV -ip "/d/Westwood/BladeRunnerENG" -ian ../common/actornames.txt -ld EN_ANY -xtre -xwav --trace +python2.7 quoteSpreadsheetCreator.py -op /d/BladeRunnerLPBackup/ENG_data/WAV -ip "/d/Westwood/BladeRunnerENG" -ian ../common/actornames.txt -ld EN_ANY -xtre -xwav -xpogo -xdevs --trace + +python2.7 quoteSpreadsheetCreator.py -op /D/BladeRunnerLPBackup/DEU_data/WAV -ip "/d/Westwood/BladeRunnerDEU" -ian ../common/actornames.txt -ld DE_DEU -xtre -xwav -xpogo -xdevs + +python2.7 quoteSpreadsheetCreator.py -op /D/BladeRunnerLPBackup/FRA_data/WAV -ip "/d/Westwood/BladeRunnerFRA" -ian ../common/actornames.txt -ld FR_FRA -xtre -xwav -xpogo -xdevs + +python2.7 quoteSpreadsheetCreator.py -op /D/BladeRunnerLPBackup/ITA_data/WAV -ip "/d/Westwood/BladeRunnerIT" -ian ../common/actornames.txt -ld IT_ITA -xtre -xwav -xpogo -xdevs + +python2.7 quoteSpreadsheetCreator.py -op /D/BladeRunnerLPBackup/ESP_data/WAV -ip "/d/Westwood/BladeRunnerESP" -ian ../common/actornames.txt -ld ES_ESP -xtre -xwav -xpogo -xdevs
\ No newline at end of file |