diff --git a/binaries/data/mods/public/simulation/templates/structures/hele_dock.xml b/binaries/data/mods/public/simulation/templates/structures/hele_dock.xml index 89a6a20e4b..74b0300627 100644 --- a/binaries/data/mods/public/simulation/templates/structures/hele_dock.xml +++ b/binaries/data/mods/public/simulation/templates/structures/hele_dock.xml @@ -8,7 +8,7 @@ hele - Limḗn + Limḗn Greece is a sea country, which is why some of the greatest Hellenic and Hellenistic cities like Ephesus, Corinth, Alexandria and Antioch were built by the sea. It should also be noted that all colonies during the Great Colonisation were thriving port centres, which traded with the local population. diff --git a/binaries/data/mods/public/simulation/templates/structures/hele_mill.xml b/binaries/data/mods/public/simulation/templates/structures/hele_mill.xml index 20970acc86..aeb8967eda 100644 --- a/binaries/data/mods/public/simulation/templates/structures/hele_mill.xml +++ b/binaries/data/mods/public/simulation/templates/structures/hele_mill.xml @@ -8,7 +8,7 @@ hele - Apothḗkē + Apothḗkē Resources and building materials were kept in warehouses. diff --git a/binaries/data/mods/public/simulation/templates/structures/hele_temple.xml b/binaries/data/mods/public/simulation/templates/structures/hele_temple.xml index e03d8d9567..9a988976d3 100644 --- a/binaries/data/mods/public/simulation/templates/structures/hele_temple.xml +++ b/binaries/data/mods/public/simulation/templates/structures/hele_temple.xml @@ -12,7 +12,7 @@ hele - Neṓs + Neṓs The Hellenes built marvelous temples in order to honour their polytheistic pantheon. While all gods were venerated, a specific patron deity was supposed to watch over each polis. diff --git a/binaries/data/mods/public/simulation/templates/units/hele_hero_demetrius.xml b/binaries/data/mods/public/simulation/templates/units/hele_hero_demetrius.xml index b5b31e262f..251bd4d88f 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_hero_demetrius.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_hero_demetrius.xml @@ -8,8 +8,8 @@ hele - Demetrius The Besieger - Dēmḗtrios Poliorkḗtēs + Demetrius The Besieger + Dēmḗtrios Poliorkḗtēs Hero Aura: Increased Range and Attack for Siege Engines. One of the Diadochi, king of Macedonia (294 BC - 288 BC), Demetrius was renowned as one of the bravest and most able successors of Alexander. As the son of Antigonus I Monophtalmus, he fought and won many important battles early on and was proclaimed king, along with his father, in 306 BC. Losing his Asian possessions after the battle of Ipsus, he later won the Macedonian throne. Fearing lest they should be overpowered by Demetrius, the other Diadochi united against him and defeated him. units/hele_hero_demetrius.png diff --git a/binaries/data/mods/public/simulation/templates/units/hele_hero_philip.xml b/binaries/data/mods/public/simulation/templates/units/hele_hero_philip.xml index 3e9b9c4f71..e3ce0c8376 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_hero_philip.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_hero_philip.xml @@ -8,8 +8,8 @@ hele - Philip II of Macedon - Phílippos B' ho Makedṓn + Philip II of Macedon + Phílippos B' ho Makedṓn Hero Aura: Increased Attack for Champion Units. The king of Macedonia (359 BC - 336 BC), he carried out vast monetary and military reforms in order to make his kingdom the most powerful force in the Greek world. Greatly enlarged the size of Macedonia by conquering much of Thrace and subduing the Greeks. Murdered in Aegae while planning a campaign against Persia. units/hele_hero_philip.png diff --git a/binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml b/binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml index f0c974266e..5dc905e9d8 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_infantry_javelinist_b.xml @@ -19,9 +19,9 @@ hele - units/hele_infantry_javelinist_b - Thracian Peltast - Peltastḗs Thrâx + units/hele_infantry_javelinist_b + Thracian Peltast + Peltastḗs Thrâx Peltasts were javelinists originating in Thrace but their form of combat was widely copied by the Hellenes, Macedonians, and Persians. Equipped with a small oval or crescent shield, a peltast would charge at enemy formations whilst hurling his javelins then fall back to avoid close combat. They wore no armor and were at a significant disadvantage against heavy infantry and cavalry, relying on their speed and skill for survival. Thracians sold their services to Hellene cities as mercenaries and added a much needed ranged and skirmishing ability to Hellenic armies. units/hele_infantry_javelinist.png diff --git a/binaries/data/mods/public/simulation/templates/units/hele_mechanical_siege_oxybeles.xml b/binaries/data/mods/public/simulation/templates/units/hele_mechanical_siege_oxybeles.xml index a7df1d7861..930d071005 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_mechanical_siege_oxybeles.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_mechanical_siege_oxybeles.xml @@ -6,7 +6,7 @@ hele - Oxybelḗs + Oxybelḗs units/hele_mechanical_siege_oxybeles.png diff --git a/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme.xml b/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme.xml index 2d4179a49a..ac151a844a 100644 --- a/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme.xml +++ b/binaries/data/mods/public/simulation/templates/units/hele_ship_trireme.xml @@ -2,8 +2,8 @@ hele - Triḗrēs - Medium Warship. + Triḗrēs + Medium Warship. Ramming Secondary Attack. The first Triremes were built circa 650BC, and by 500BC the Trireme was the most widely used heavy warship of the Greek city-states. In the Trireme the outriggers were now an integral part of the ship's hull. The Trireme also had a partial or full fighting deck above the rowers. The length of the Trireme remained approximately 35-38 meters, and the beam was approximately 3.5 metres. A Trireme carried 170 oarsmen, plus twenty sailors and fourteen marines in Greek navies. The top speed of a Trireme was approximately 11.5 knots. Some Triremes may have been able to reach higher speeds in short bursts. A Trireme travelling from Athens to Mitylene in 427BC made the 350 kilometre trip in only 24 hours, averaging eight knots (14.6 km/h). The Trireme could accelerate much faster than a Bireme or Penteconter, and was much more manoeuvrable. This gave the Trireme an advantage in combat, where higher speed and manoeuvrability meant a better chance of victory. units/hele_ship_trireme.png diff --git a/binaries/data/mods/public/simulation/templates/units/rome_support_female_citizen.xml b/binaries/data/mods/public/simulation/templates/units/rome_support_female_citizen.xml index 62dd177eb9..3797b5bd48 100644 --- a/binaries/data/mods/public/simulation/templates/units/rome_support_female_citizen.xml +++ b/binaries/data/mods/public/simulation/templates/units/rome_support_female_citizen.xml @@ -4,7 +4,7 @@ rome Matrona Romana units/rome_support_female_citizen.png - Roman women in the Republic were in a similar state as their Greek counterparts. When a Roman woman married their dowry and property passed to their father-in-law, while she herself became the property of her husband. Their job was to raise the children and helping in farm work or running the family business. It was a sign of affluence when a man’s wife did not have to work. + Roman women in the Republic were in a similar state as their Greek counterparts. When a Roman woman married their dowry and property passed to their father-in-law, while she herself became the property of her husband. Their job was to raise the children and helping in farm work or running the family business. It was a sign of affluence when a man's wife did not have to work. units/romans/female_citizen.xml diff --git a/binaries/data/mods/public/simulation/templates/units/rome_support_trader.xml b/binaries/data/mods/public/simulation/templates/units/rome_support_trader.xml index f49bc705b3..f67be22fff 100644 --- a/binaries/data/mods/public/simulation/templates/units/rome_support_trader.xml +++ b/binaries/data/mods/public/simulation/templates/units/rome_support_trader.xml @@ -3,7 +3,7 @@ rome Plebean - Plebians were the poor class in Roman society, underneath the patricians, often carrying out much local trading and business. While patricians financed large business ventures plebian merchants did the actual work. They traded far and wide, from Iberia to Syria, buying and selling everything from salt to wool to horses to metals to glass to slaves. Rome’s extensive network of roads within Italy, many ports, and central location within the Mediterranean made it an ideal place to do business. + Plebians were the poor class in Roman society, underneath the patricians, often carrying out much local trading and business. While patricians financed large business ventures plebian merchants did the actual work. They traded far and wide, from Iberia to Syria, buying and selling everything from salt to wool to horses to metals to glass to slaves. Rome's extensive network of roads within Italy, many ports, and central location within the Mediterranean made it an ideal place to do business. units/romans/trader.xml diff --git a/source/tools/fontbuilder2/dumpfontchars.py b/source/tools/fontbuilder2/dumpfontchars.py new file mode 100644 index 0000000000..0a1a6dd500 --- /dev/null +++ b/source/tools/fontbuilder2/dumpfontchars.py @@ -0,0 +1,18 @@ +# Dumps lines containing the name of a font followed by a space-separated +# list of decimal codepoints (from U+0001 to U+FFFF) for which that font +# contains some glyph data. + +import FontLoader + +def dump_font(ttf): + + (face, indexes) = FontLoader.create_cairo_font_face_for_file("../../../binaries/data/tools/fontbuilder/fonts/%s" % ttf, 0, FontLoader.FT_LOAD_DEFAULT) + + mappings = [ (c, indexes(unichr(c))) for c in range(1, 65535) ] + print ttf, + print ' '.join(str(c) for (c, g) in mappings if g != 0) + +dump_font("DejaVuSansMono.ttf") +dump_font("DejaVuSans.ttf") +dump_font("texgyrepagella-regular.otf") +dump_font("texgyrepagella-bold.otf") diff --git a/source/tools/fontbuilder2/testcharset.pl b/source/tools/fontbuilder2/testcharset.pl index 882fda3f9d..ac4ff3ee51 100644 --- a/source/tools/fontbuilder2/testcharset.pl +++ b/source/tools/fontbuilder2/testcharset.pl @@ -1,3 +1,10 @@ +# Tests the characters contained within entity template XML files (most usefully +# their s) against the characters included in the bitmap font subset, +# and against the glyph data in the fonts themselves. +# When unsupported characters are reported, you should either edit the XML files +# to avoid them (e.g. use a codepoint that better corresponds to the character, +# or use a NFC or NFD version of the character) or add them to charset.txt. + use strict; use warnings; @@ -30,6 +37,19 @@ $chars{"\r"} = undef; $chars{"\n"} = undef; $chars{"\t"} = undef; +my %fontchars; +{ + open my $f, 'python dumpfontchars.py|' or die $!; + while (<$f>) + { + my ($name, @chars) = split; + push @chars, 0x0009, 0x000A, 0x000D; + @{$fontchars{$name}}{map chr($_), @chars} = (); + } +} + +delete $chars{chr(0x301)}; + for my $fn (sort(find_entities())) { open my $f, "<", $fn or die $!; @@ -38,9 +58,23 @@ for my $fn (sort(find_entities())) @fchars{split //, do { local $/; <$f> }} = (); for (sort keys %fchars) { + my @missing; if (not exists $chars{$_}) { - printf "%s\n# Missing char U+%04X\n\n", $fn, ord $_; + push @missing, 'charset'; + } + for my $font (sort keys %fontchars) + { + if (not exists $fontchars{$font}{$_}) + { + push @missing, $font; + } + } + if (@missing) + { + printf "%s\n# Missing char U+%04X from %s\n\n", $fn, ord($_), (join ', ', @missing); } } } + +print "Done.\n";