-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.6 Extension from Teotihuacan, Umayyad, Mongol empire to Inca and many more #38
Conversation
special 4.6 version for Vietnamese - shifted graphics - maybe this is a general solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work in the last 2 weeks
@@ -9,5 +9,5 @@ epic_gilgamesh,-1630,-1280,12.8,Epic of Gilgamesh | |||
oxyrhynchus,150,550,18.2,Oxyrhynchus Papyri | |||
p52,125,175,19.6,Rylands Library Papyrus P52 | |||
xia-dynasty,-2070,-1580,12.2,semi-legendary period | |||
ur3,-2112,-2004,2.3,Third Dynasty of Ur | |||
ur3,-2112,-2004,2.7,Third Dynasty of Ur |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shift down to not overlap in Vietnamese - looks good in other languages, too
@@ -66,7 +66,7 @@ tang-dynasty2,705,907,43,tang-dynasty2_c,r,,705,907 | |||
wu-zhou,690,705,44, ,r,,690,705 | |||
gonghe,-841,-828,43.2, ,l,,-841,-828 | |||
siloam-tunnel,-740,-732,32, ,l,,-742,-732 | |||
millenium,2060,2100,20.1, ,l,,2060,2120 | |||
millenium,2060,2120,20.1, ,l,2120-2150,2060,2150 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it closer to the end, it's going to last 1000 years!
@@ -76,7 +76,7 @@ mongol_empire,1206,1294,20.5, ,l,,1206,1304 | |||
maya_classic,250,952,22.1,maya_classic_c,l,,230,970 | |||
maya_postclassic,948,1539,23.1,maya_postclassic_c,l,,930,1539 | |||
inca_empire,1438,1533,34.3,inca_empire_c,l,,1438,1572 | |||
gupta_empire,319,550,20,gupta_empire_c,r,,270,550 | |||
gupta_empire,319,550,20.7,gupta_empire_c,r,,270,550 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a little down for Vietnamese - and again, it looks better in other languages
@@ -21,4 +21,4 @@ leningradensis.jpg,1010,6.6,15,17.9,300,358,1008, | |||
amarna.jpg,-1350,23.5,14,15.44,300,331,Amarna EA 330, | |||
iphone.jpg,2007,45.7,7,13.158,532,1000,2007, | |||
hammurabi.jpg,-1870,10.8,11,12.17,300,332,0, | |||
lament_for_ur.jpg,-2020,7,11,17.16,250,390,lament for Ur, | |||
lament_for_ur.jpg,-2020,8,11,17.16,250,390,lament for Ur, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further down to not overlap in Vietnamese, and plenty of space in other languages, just keep it at this locationi
page = pdf_document.new_page() | ||
|
||
# Set text | ||
text = "Hello, World! ស្ស" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently not rendered correctly, mentioned in #35
def x_position(date_float): # area is 6150 years wide | ||
global x1, right_to_left | ||
if not right_to_left: | ||
return x1 + (4075 + date_float) * dots_year | ||
else: | ||
return x1 + (2075 - date_float) * dots_year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTL feature for 4.7 - no impact for western languages in 4.6
def number_to_string(number, language): | ||
# list_languages_special_numerals = ["ar", "fa", "si", "km"] | ||
languages_special_numerals = {'ar': 'arabic_numerals', | ||
'fa': 'farsi_numerals', | ||
'si': 'sinhala_numerals', | ||
'km': 'khmer_numerals'} | ||
arabic_numerals = { | ||
'0': '٠', '1': '١', '2': '٢', '3': '٣', '4': '٤', | ||
'5': '٥', '6': '٦', '7': '٧', '8': '٨', '9': '٩'} | ||
farsi_numerals = { | ||
'0': '۰', '1': '۱', '2': '۲', '3': '۳', '4': '۴', | ||
'5': '۵', '6': '۶', '7': '۷', '8': '۸', '9': '۹'} | ||
sinhala_numerals = { | ||
'0': '෦', '1': '෧', '2': '෨', '3': '෩', '4': '෪', | ||
'5': '෫', '6': '෬', '7': '෭', '8': '෮', '9': '෯'} | ||
khmer_numerals = { | ||
'0': '០', '1': '១', '2': '២', '3': '៣', '4': '៤', | ||
'5': '៥', '6': '៦', '7': '៧', '8': '៨', '9': '៩'} | ||
if language in languages_special_numerals: | ||
new_numerals = locals()[languages_special_numerals[language]] | ||
|
||
# if language == "km": | ||
# new_numerals = khmer_numerals | ||
return ''.join(new_numerals[digit] for digit in str(number)) | ||
else: | ||
return str(number) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.6 feature to have the Arabic numerals replaced with the language specific ones in Arabic, Farsi (Persian), Sinhala and Khmer
''' a remnant from the fix in v4.0 before making the page wider by 20 mm left/right | ||
if i == 0: # the year 4000 BCE | ||
if stringWidth(dict["BCE"], font_regular, 11) > 30: | ||
print_year = False | ||
if i == 60: # the year 2000 CE | ||
if stringWidth(dict["CE"], font_regular, 11) > 30: | ||
print_year = False | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up
if right_to_left: | ||
if index < 23: | ||
drawString(detail, fontsize_regular, x_box + x_boxwidth - 2, y_box, "l") | ||
else: | ||
drawString(detail, fontsize_regular, x_box + 2, y_box, "r") | ||
else: | ||
if index < 23: | ||
drawString(detail, fontsize_regular, x_box + x_boxwidth + 2, y_box, "r") | ||
else: | ||
drawString(detail, fontsize_regular, x_box - 2, y_box, "l") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTL support in 4.7 needs some bigger changes
if right_to_left: | ||
c.drawRightString(x_position(-4075), y1 + 2, f"Timeline {version} – created {str(datetime.datetime.now())[0:16]} – {pdf_author} – some images are CC BY-SA") | ||
else: | ||
c.drawString(x_position(-4075), y1 + 2, f"Timeline {version} – created {str(datetime.datetime.now())[0:16]} – {pdf_author} – some images are CC BY-SA") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RTL support almost brings the line count to 1000
Time of 12 Prophets from 850 BCE to 400 BCE | ||
|
||
### Short history of this project - with just pictures | ||
![time of 12 prophets](docs/12prophets.jpg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see this addition - after brunch at Elizabeth!
A few more historic events made it into the timeline.
Also the translations to Kankana-ey, Ilocano and Tagalog were significantly improved.