@@ -20,6 +20,7 @@ def __init__(self):
2020 super ().__init__ ()
2121 self .init_repo ()
2222
23+ self .font = settings .font
2324 self .fontColor = m .BLACK if settings .light_mode else m .WHITE
2425 self .drawnCommits = {}
2526 self .drawnRefs = {}
@@ -187,7 +188,7 @@ def show_intro(self):
187188
188189 initialCommitText = m .Text (
189190 settings .title ,
190- font = "Monospace" ,
191+ font = self . font ,
191192 font_size = 36 ,
192193 color = self .fontColor ,
193194 ).to_edge (m .UP , buff = 1 )
@@ -215,15 +216,15 @@ def show_outro(self):
215216
216217 outroTopText = m .Text (
217218 settings .outro_top_text ,
218- font = "Monospace" ,
219+ font = self . font ,
219220 font_size = 36 ,
220221 color = self .fontColor ,
221222 ).to_edge (m .UP , buff = 1 )
222223 self .play (m .AddTextLetterByLetter (outroTopText ))
223224
224225 outroBottomText = m .Text (
225226 settings .outro_bottom_text ,
226- font = "Monospace" ,
227+ font = self . font ,
227228 font_size = 36 ,
228229 color = self .fontColor ,
229230 ).to_edge (m .DOWN , buff = 1 )
@@ -342,7 +343,7 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
342343 "\n " .join (
343344 commitMessage [j : j + 20 ] for j in range (0 , len (commitMessage ), 20 )
344345 )[:100 ],
345- font = "Monospace" ,
346+ font = self . font ,
346347 font_size = 20 if settings .highlight_commit_messages else 14 ,
347348 color = self .fontColor ,
348349 weight = m .BOLD
@@ -403,7 +404,7 @@ def build_commit_id_and_message(self, commit, i):
403404 if commit == "dark" :
404405 commitId = m .Text (
405406 "" ,
406- font = "Monospace" ,
407+ font = self . font ,
407408 font_size = 20 ,
408409 color = self .fontColor ,
409410 weight = self .font_weight ,
@@ -412,7 +413,7 @@ def build_commit_id_and_message(self, commit, i):
412413 else :
413414 commitId = m .Text (
414415 commit .hexsha [0 :6 ],
415- font = "Monospace" ,
416+ font = self . font ,
416417 font_size = 20 ,
417418 color = self .fontColor ,
418419 weight = self .font_weight ,
@@ -433,7 +434,7 @@ def draw_head(self, commit, i, commitId):
433434 headbox .next_to (commitId , m .UP )
434435 headText = m .Text (
435436 "HEAD" ,
436- font = "Monospace" ,
437+ font = self . font ,
437438 font_size = 20 ,
438439 color = self .fontColor ,
439440 weight = self .font_weight ,
@@ -484,7 +485,7 @@ def draw_branch(self, commit, i, make_branches_remote=False):
484485
485486 branchText = m .Text (
486487 text ,
487- font = "Monospace" ,
488+ font = self . font ,
488489 font_size = 20 ,
489490 color = self .fontColor ,
490491 weight = self .font_weight ,
@@ -530,7 +531,7 @@ def draw_tag(self, commit, i):
530531 if commit .hexsha == tag .commit .hexsha :
531532 tagText = m .Text (
532533 tag .name ,
533- font = "Monospace" ,
534+ font = self . font ,
534535 font_size = 20 ,
535536 color = self .fontColor ,
536537 weight = self .font_weight ,
@@ -694,7 +695,7 @@ def setup_and_draw_zones(
694695 firstColumnTitle = (
695696 m .Text (
696697 first_column_name ,
697- font = "Monospace" ,
698+ font = self . font ,
698699 font_size = 28 ,
699700 color = self .fontColor ,
700701 weight = m .BOLD ,
@@ -705,7 +706,7 @@ def setup_and_draw_zones(
705706 secondColumnTitle = (
706707 m .Text (
707708 second_column_name ,
708- font = "Monospace" ,
709+ font = self . font ,
709710 font_size = 28 ,
710711 color = self .fontColor ,
711712 weight = m .BOLD ,
@@ -716,7 +717,7 @@ def setup_and_draw_zones(
716717 thirdColumnTitle = (
717718 m .Text (
718719 third_column_name ,
719- font = "Monospace" ,
720+ font = self . font ,
720721 font_size = 28 ,
721722 color = self .fontColor ,
722723 weight = m .BOLD ,
@@ -1060,7 +1061,7 @@ def setup_and_draw_parent(
10601061
10611062 commitId = m .Text (
10621063 "abcdef" ,
1063- font = "Monospace" ,
1064+ font = self . font ,
10641065 font_size = 20 ,
10651066 color = self .fontColor ,
10661067 weight = self .font_weight ,
@@ -1072,7 +1073,7 @@ def setup_and_draw_parent(
10721073 "\n " .join (
10731074 commitMessage [j : j + 20 ] for j in range (0 , len (commitMessage ), 20 )
10741075 )[:100 ],
1075- font = "Monospace" ,
1076+ font = self . font ,
10761077 font_size = 14 ,
10771078 color = self .fontColor ,
10781079 weight = self .font_weight ,
@@ -1125,7 +1126,7 @@ def get_nondark_commits(self):
11251126 def draw_ref (self , commit , top , i = 0 , text = "HEAD" , color = m .BLUE ):
11261127 refText = m .Text (
11271128 text ,
1128- font = "Monospace" ,
1129+ font = self . font ,
11291130 font_size = 20 ,
11301131 color = self .fontColor ,
11311132 weight = self .font_weight ,
@@ -1198,7 +1199,7 @@ def create_zone_text(
11981199 text = (
11991200 m .Text (
12001201 self .trim_path (f ),
1201- font = "Monospace" ,
1202+ font = self . font ,
12021203 font_size = 24 ,
12031204 color = self .fontColor ,
12041205 )
@@ -1214,7 +1215,7 @@ def create_zone_text(
12141215 text = (
12151216 m .Text (
12161217 self .trim_path (f ),
1217- font = "Monospace" ,
1218+ font = self . font ,
12181219 font_size = 24 ,
12191220 color = self .fontColor ,
12201221 )
@@ -1230,7 +1231,7 @@ def create_zone_text(
12301231 text = (
12311232 m .Text (
12321233 self .trim_path (f ),
1233- font = "Monospace" ,
1234+ font = self . font ,
12341235 font_size = 24 ,
12351236 color = self .fontColor ,
12361237 )
@@ -1252,7 +1253,7 @@ def color_by(self, offset=0):
12521253 for i , author in enumerate (sorted_authors ):
12531254 authorText = m .Text (
12541255 f"{ author [:15 ]} ({ str (len (self .author_groups [author ]))} )" ,
1255- font = "Monospace" ,
1256+ font = self . font ,
12561257 font_size = 36 ,
12571258 color = self .colors [int (i % 11 )],
12581259 weight = self .font_weight ,
0 commit comments