Skip to content

Commit

Permalink
fix(formula): update NimbusRomNo9L font pattern for formulas detection
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaawwa committed Mar 7, 2025
1 parent 78172bf commit 872c371
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions babeldoc/document_il/midend/styles_and_formulas.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,7 @@ def is_translatable_formula(self, formula: PdfFormula) -> bool:
return bool(re.match(r"^[0-9, ]+$", text))

def is_formulas_font(self, font_name: str) -> bool:
pattern2 = (
r"^(Cambria|Cambria-BoldItalic|Cambria-Bold|Cambria-Italic|EUAlbertina.+)$"
)
pattern2 = r"^(Cambria|Cambria-BoldItalic|Cambria-Bold|Cambria-Italic|EUAlbertina.+|NimbusRomNo9L.+)$"
if self.translation_config.formular_font_pattern:
pattern = self.translation_config.formular_font_pattern
else:
Expand Down

0 comments on commit 872c371

Please sign in to comment.