From d2d7de01afa9f51701d1617ac3f36a0bc7bd398c Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Fri, 24 Nov 2023 18:36:30 +0100 Subject: [PATCH] add header_font_size option --- rendercv/data_model.py | 6 ++++++ rendercv/templates/classic/components/header.tex.j2 | 2 +- schema.json | 8 ++++++++ tests/reference_files/John_Doe_CV_tex_reference.tex | 4 ++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/rendercv/data_model.py b/rendercv/data_model.py index c1525d5..b729623 100644 --- a/rendercv/data_model.py +++ b/rendercv/data_model.py @@ -517,6 +517,12 @@ class ClassicThemeOptions(BaseModel): ), ) + header_font_size: LaTeXDimension = Field( + default="30 pt", + title="Header Font Size", + description="The font size of the header (the name of the person).", + ) + margins: ClassicThemeMargins = Field( default=ClassicThemeMargins(), title="Margins", diff --git a/rendercv/templates/classic/components/header.tex.j2 b/rendercv/templates/classic/components/header.tex.j2 index 2f8e0fe..dd7809c 100644 --- a/rendercv/templates/classic/components/header.tex.j2 +++ b/rendercv/templates/classic/components/header.tex.j2 @@ -1,7 +1,7 @@ ((* import "components/header_connections.tex.j2" as print_connections *)) ((* macro header(name, connections) *)) \begin{header} - \Huge + \fontsize{<>}{<>} \textbf{<>} \vspace{<>} diff --git a/schema.json b/schema.json index b77e125..a4c4e3a 100644 --- a/schema.json +++ b/schema.json @@ -192,6 +192,13 @@ "title": "Show Last Updated Date", "type": "boolean" }, + "header_font_size": { + "default": "30 pt", + "description": "The font size of the header (the name of the person).", + "pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)", + "title": "Header Font Size", + "type": "string" + }, "margins": { "allOf": [ { @@ -1600,6 +1607,7 @@ "font_size": "10pt", "options": { "date_and_location_width": "4.1 cm", + "header_font_size": "30 pt", "margins": { "entry_area": { "left_and_right": "0.2 cm", diff --git a/tests/reference_files/John_Doe_CV_tex_reference.tex b/tests/reference_files/John_Doe_CV_tex_reference.tex index 65a4451..9ffcb9e 100644 --- a/tests/reference_files/John_Doe_CV_tex_reference.tex +++ b/tests/reference_files/John_Doe_CV_tex_reference.tex @@ -109,7 +109,7 @@ \LenToUnit{\paperwidth-1.35 cm-0.2 cm+0.05cm}, \LenToUnit{\paperheight-0.675 cm} ){\vtop{{\null}\makebox[0pt][c]{ - \small\color{gray}\textit{Last updated on November 22, 2023}\hspace{\widthof{Last updated on November 22, 2023}} + \small\color{gray}\textit{Last updated on REPLACETHISWITHTODAY}\hspace{\widthof{Last updated on REPLACETHISWITHTODAY}} }}}% }% }% @@ -123,7 +123,7 @@ \placelastupdatedtext \begin{header} - \Huge + \fontsize{30 pt}{30 pt} \textbf{John Doe} \vspace{0.2 cm}