mirror of https://github.com/eyhc1/rendercv.git
themes: add five font options for classic, sb2nov, and engineeringresumes themes: "Latin Modern Serif", "Latin Modern Sans Serif", "Latin Modern Mono", "Source Sans 3", and "Charter."
This commit is contained in:
parent
0249d69793
commit
f7ed843209
|
@ -180,10 +180,23 @@ class ThemeOptions(pydantic.BaseModel):
|
|||
duplication.
|
||||
"""
|
||||
|
||||
theme: Literal["tobeoverwritten"]
|
||||
|
||||
model_config = pydantic.ConfigDict(extra="forbid")
|
||||
|
||||
theme: Literal["tobeoverwritten"]
|
||||
|
||||
font: Literal[
|
||||
"Latin Modern Serif",
|
||||
"Latin Modern Sans Serif",
|
||||
"Latin Modern Mono",
|
||||
"Source Sans 3",
|
||||
"Charter",
|
||||
] = pydantic.Field(
|
||||
default="Latin Modern Serif",
|
||||
title="Font",
|
||||
description=(
|
||||
"The font family of the CV. The default value is Latin Modern Serif."
|
||||
),
|
||||
)
|
||||
font_size: Literal["10pt", "11pt", "12pt"] = pydantic.Field(
|
||||
default="10pt",
|
||||
title="Font Size",
|
||||
|
|
|
@ -34,17 +34,27 @@
|
|||
\usepackage{needspace} % for avoiding page brake right after the section title
|
||||
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
||||
|
||||
% Theme specific:
|
||||
\usepackage[default, type1]{sourcesanspro} % for using source sans 3 font
|
||||
|
||||
% Ensure that generate pdf is machine readable/ATS parsable:
|
||||
\ifPDFTeX
|
||||
\input{glyphtounicode}
|
||||
\pdfgentounicode=1
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{lmodern}
|
||||
\fi
|
||||
|
||||
((* if design.font == "Latin Modern Serif" *))
|
||||
|
||||
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||
\renewcommand{\familydefault}{\sfdefault}
|
||||
((* elif design.font == "Latin Modern Mono" *))
|
||||
\renewcommand{\familydefault}{\ttdefault}
|
||||
((* elif design.font == "Source Sans 3" *))
|
||||
\usepackage[default, type1]{sourcesanspro}
|
||||
((* elif design.font == "Charter" *))
|
||||
\usepackage{charter}
|
||||
((* endif *))
|
||||
|
||||
% Some settings:
|
||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||
\usepackage[none]{hyphenat}
|
||||
|
|
|
@ -32,6 +32,17 @@ class ClassicThemeOptions(ThemeOptions):
|
|||
"""This class is the data model of the theme options for the `classic` theme."""
|
||||
|
||||
theme: Literal["classic"]
|
||||
font: Literal[
|
||||
"Latin Modern Serif",
|
||||
"Latin Modern Sans Serif",
|
||||
"Latin Modern Mono",
|
||||
"Source Sans 3",
|
||||
"Charter",
|
||||
] = pydantic.Field(
|
||||
default="Source Sans 3",
|
||||
title="Font",
|
||||
description="The font family of the CV. The default value is Source Sans 3.",
|
||||
)
|
||||
show_timespan_in: list[str] = pydantic.Field(
|
||||
default=[],
|
||||
title="Show Time Span in These Sections",
|
||||
|
|
|
@ -34,17 +34,27 @@
|
|||
\usepackage{needspace} % for avoiding page brake right after the section title
|
||||
\usepackage{iftex} % check if engine is pdflatex, xetex or luatex
|
||||
|
||||
% Theme specific:
|
||||
\usepackage{charter} % for using charter font
|
||||
|
||||
% Ensure that generate pdf is machine readable/ATS parsable:
|
||||
\ifPDFTeX
|
||||
\input{glyphtounicode}
|
||||
\pdfgentounicode=1
|
||||
\usepackage[T1]{fontenc}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{lmodern}
|
||||
\fi
|
||||
|
||||
((* if design.font == "Latin Modern Serif" *))
|
||||
|
||||
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||
\renewcommand{\familydefault}{\sfdefault}
|
||||
((* elif design.font == "Latin Modern Mono" *))
|
||||
\renewcommand{\familydefault}{\ttdefault}
|
||||
((* elif design.font == "Source Sans 3" *))
|
||||
\usepackage[default, type1]{sourcesanspro}
|
||||
((* elif design.font == "Charter" *))
|
||||
\usepackage{charter}
|
||||
((* endif *))
|
||||
|
||||
% Some settings:
|
||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||
\usepackage[none]{hyphenat}
|
||||
|
|
|
@ -100,6 +100,17 @@ class EngineeringresumesThemeOptions(ThemeOptions):
|
|||
"""
|
||||
|
||||
theme: Literal["engineeringresumes"]
|
||||
font: Literal[
|
||||
"Latin Modern Serif",
|
||||
"Latin Modern Sans Serif",
|
||||
"Latin Modern Mono",
|
||||
"Source Sans 3",
|
||||
"Charter",
|
||||
] = pydantic.Field(
|
||||
default="Charter",
|
||||
title="Font",
|
||||
description="The font family of the CV. The default value is Charter.",
|
||||
)
|
||||
header_font_size: LaTeXDimension = pydantic.Field(
|
||||
default="25 pt",
|
||||
title="Header Font Size",
|
||||
|
|
|
@ -40,8 +40,21 @@
|
|||
\pdfgentounicode=1
|
||||
% \usepackage[T1]{fontenc} % this breaks sb2nov
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage{lmodern}
|
||||
\fi
|
||||
|
||||
((* if design.font == "Latin Modern Serif" *))
|
||||
|
||||
((* elif design.font == "Latin Modern Sans Serif" *))
|
||||
\renewcommand{\familydefault}{\sfdefault}
|
||||
((* elif design.font == "Latin Modern Mono" *))
|
||||
\renewcommand{\familydefault}{\ttdefault}
|
||||
((* elif design.font == "Source Sans 3" *))
|
||||
\usepackage[default, type1]{sourcesanspro}
|
||||
((* elif design.font == "Charter" *))
|
||||
\usepackage{charter}
|
||||
((* endif *))
|
||||
|
||||
% Some settings:
|
||||
((* if design.text_alignment == "justified-with-no-hyphenation" *))
|
||||
\usepackage[none]{hyphenat}
|
||||
|
|
|
@ -31,6 +31,19 @@ class Sb2novThemeOptions(ThemeOptions):
|
|||
"""This class is the data model of the theme options for the `sb2nov` theme."""
|
||||
|
||||
theme: Literal["sb2nov"]
|
||||
font: Literal[
|
||||
"Latin Modern Serif",
|
||||
"Latin Modern Sans Serif",
|
||||
"Latin Modern Mono",
|
||||
"Source Sans 3",
|
||||
"Charter",
|
||||
] = pydantic.Field(
|
||||
default="Latin Modern Serif",
|
||||
title="Font",
|
||||
description=(
|
||||
"The font family of the CV. The default value is Latin Modern Serif."
|
||||
),
|
||||
)
|
||||
header_font_size: LaTeXDimension = pydantic.Field(
|
||||
default="24 pt",
|
||||
title="Header Font Size",
|
||||
|
|
Loading…
Reference in New Issue