Skip to content

Commit

Permalink
Fix: apparently font-family: inherit; does not go well in PDF when a …
Browse files Browse the repository at this point in the history
…non western font is used.
  • Loading branch information
srobotta committed Jan 24, 2025
1 parent ee34733 commit 238bd70
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions classes/utils/font.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ public function get_font_base() {
public function get_font_student() {
if (!$this->fontstudent) {
$touser = \core_user::get_user($this->report->get_to_user_id());
$font = $this->eval_string(fullname($touser));
$this->fontstudent = $font === $this->get_font_base() ? 'inherit' : $font;
$this->fontstudent = $this->eval_string(fullname($touser));
}
return $this->fontstudent;
}
Expand All @@ -112,8 +111,7 @@ public function get_font_teacher() {
$this->fontteacher = 'inherit';
foreach ($this->report->get_from_user_ids() as $fromuserid) {
$fromuser = \core_user::get_user($fromuserid);
$font = $this->eval_string(fullname($fromuser));
$this->fontteacher = $font === $this->get_font_base() ? 'inherit' : $font;
$this->fontteacher = $this->eval_string(fullname($fromuser));
break;
}
}
Expand Down

0 comments on commit 238bd70

Please sign in to comment.