Skip to content

Commit

Permalink
fix: fix nonLatinOverwrite functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mintyfrankie committed Jul 12, 2024
1 parent 535dc1d commit 9d8e254
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions brilliant-CV/template.typ
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
#let metadata = toml("../metadata.toml")

/* Language-specific Macros */
// FIXME: doesn't work in non-latin languages
#let nonLatinOverwrite = false
#let nonLatinFont = ""
#let nonLatinLanguageCode = ("zh", "ja", "ko", "ru")
#let nonLatinName = ""
#for lang in nonLatinLanguageCode {
if metadata.language == lang {
nonLatinOverwrite = true
firstName = nonLatinOverwriteInfo.at("firstName")
lastName = nonLatinOverwriteInfo.at("lastName")
nonLatinFont = nonLatinOverwriteInfo.at("customFont")
nonLatinName = metadata.lang.non_latin.name
nonLatinFont = metadata.lang.non_latin.custom_font
}
}

Expand Down Expand Up @@ -282,7 +281,9 @@
inset: 0pt,
stroke: none,
row-gutter: 6mm,
[#headerFirstNameStyle(metadata.personal.first_name) #h(5pt) #headerLastNameStyle(metadata.personal.last_name)],
if nonLatinOverwrite [
#headerFirstNameStyle(nonLatinName)
] else [#headerFirstNameStyle(metadata.personal.first_name) #h(5pt) #headerLastNameStyle(metadata.personal.last_name)],
[#headerInfoStyle(makeHeaderInfo())],
[#headerQuoteStyle(languageSwitch("header_quote"))],
)
Expand Down

0 comments on commit 9d8e254

Please sign in to comment.