Add design.section_titles.font_family, design.header.name_font_family, and design.header.connections_font_family options

This commit is contained in:
Sina Atalay
2025-02-01 18:11:40 -05:00
parent 5aafa205ee
commit b12fc2e759
31 changed files with 215 additions and 112 deletions

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 KiB

After

Width:  |  Height:  |  Size: 756 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 742 KiB

After

Width:  |  Height:  |  Size: 701 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 788 KiB

After

Width:  |  Height:  |  Size: 788 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 KiB

After

Width:  |  Height:  |  Size: 702 KiB

View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 KiB

After

Width:  |  Height:  |  Size: 618 KiB

View File

@@ -272,88 +272,107 @@ An example `design` field for a `classic` theme is shown below:
```yaml
theme: classic # (1)!
page:
size: us-letter # (2)!
top_margin: 2cm
bottom_margin: 2cm
left_margin: 2cm
right_margin: 2cm
show_page_numbering: true
show_last_updated_date: true
colors:
text: black
name: '#004f90'
connections: '#004f90'
section_titles: '#004f90'
links: '#004f90'
last_updated_date_and_page_numbering: grey
text:
font_family: Source Sans 3 # (3)!
font_size: 10pt
leading: 0.6em
alignment: justified # (4)!
date_and_location_column_alignment: right # (5)!
links:
underline: false
use_external_link_icon: true
header:
name_font_size: 30pt
name_bold: true
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
separator_between_connections: ''
use_icons_for_connections: true
alignment: center # (6)!
section_titles:
type: with-parial-line # (7)!
font_size: 1.4em
bold: true
small_caps: false
line_thickness: 0.5pt
vertical_space_above: 0.5cm
vertical_space_below: 0.3cm
entries:
date_and_location_width: 4.15cm
left_and_right_margin: 0.2cm
horizontal_space_between_columns: 0.1cm
vertical_space_between_entries: 1.2em
allow_page_break_in_entries: true
short_second_row: false
show_time_spans_in: []
highlights:
bullet: • # (8)!
top_margin: 0.25cm
left_margin: 0.4cm
vertical_space_between_highlights: 0.25cm
horizontal_space_between_bullet_and_highlight: 0.5em
summary_left_margin: 0cm
entry_types:
one_line_entry:
template: '**LABEL:** DETAILS'
education_entry:
main_column_first_row_template: '**INSTITUTION**, AREA'
degree_column_template: '**DEGREE**'
degree_column_width: 1cm
main_column_second_row_template: "SUMMARY\nHIGHLIGHTS"
date_and_location_column_template: "LOCATION\nDATE"
normal_entry:
main_column_first_row_template: '**NAME**'
main_column_second_row_template: "SUMMARY\nHIGHLIGHTS"
date_and_location_column_template: "LOCATION\nDATE"
experience_entry:
main_column_first_row_template: '**COMPANY**, POSITION'
main_column_second_row_template: "SUMMARY\nHIGHLIGHTS"
date_and_location_column_template: "LOCATION\nDATE"
publication_entry:
main_column_first_row_template: '**TITLE**'
main_column_second_row_template: "AUTHORS\nURL (JOURNAL)"
main_column_second_row_without_journal_template: "AUTHORS\n\
URL"
main_column_second_row_without_url_template: "AUTHORS\n\
JOURNAL"
date_and_location_column_template: DATE
page:
size: us-letter # (2)!
top_margin: 2cm
bottom_margin: 2cm
left_margin: 2cm
right_margin: 2cm
show_page_numbering: true
show_last_updated_date: true
colors:
text: black
name: '#004f90'
connections: '#004f90'
section_titles: '#004f90'
links: '#004f90'
last_updated_date_and_page_numbering: grey
text:
font_family: Source Sans 3 # (3)!
font_size: 10pt
leading: 0.6em
alignment: justified # (4)!
date_and_location_column_alignment: right # (5)!
links:
underline: false
use_external_link_icon: true
header:
name_font_family: Source Sans 3
name_font_size: 30pt
name_bold: true
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: Source Sans 3
separator_between_connections: ''
use_icons_for_connections: true
alignment: center # (6)!
section_titles:
type: with-parial-line # (7)!
font_family: Source Sans 3
font_size: 1.4em
bold: true
small_caps: false
line_thickness: 0.5pt
vertical_space_above: 0.5cm
vertical_space_below: 0.3cm
entries:
date_and_location_width: 4.15cm
left_and_right_margin: 0.2cm
horizontal_space_between_columns: 0.1cm
vertical_space_between_entries: 1.2em
allow_page_break_in_entries: true
short_second_row: false
show_time_spans_in: []
highlights:
bullet: • # (8)!
top_margin: 0.25cm
left_margin: 0.4cm
vertical_space_between_highlights: 0.25cm
horizontal_space_between_bullet_and_highlight: 0.5em
summary_left_margin: 0cm
entry_types:
one_line_entry:
template: '**LABEL:** DETAILS'
education_entry:
main_column_first_row_template: '**INSTITUTION**, AREA'
degree_column_template: '**DEGREE**'
degree_column_width: 1cm
main_column_second_row_template: |-
SUMMARY
HIGHLIGHTS
date_and_location_column_template: |-
LOCATION
DATE
normal_entry:
main_column_first_row_template: '**NAME**'
main_column_second_row_template: |-
SUMMARY
HIGHLIGHTS
date_and_location_column_template: |-
LOCATION
DATE
experience_entry:
main_column_first_row_template: '**COMPANY**, POSITION'
main_column_second_row_template: |-
SUMMARY
HIGHLIGHTS
date_and_location_column_template: |-
LOCATION
DATE
publication_entry:
main_column_first_row_template: '**TITLE**'
main_column_second_row_template: |-
AUTHORS
URL (JOURNAL)
main_column_second_row_without_journal_template: |-
AUTHORS
URL
main_column_second_row_without_url_template: |-
AUTHORS
JOURNAL
date_and_location_column_template: DATE
```
1. The `design.theme` field only changes the default values of all the other fields in the `design` field. Therefore, if you don't change any of the other fields, the output will be the same for all the themes. You can remove all the other fields and just keep the `design.theme` field to use the default values of that theme.

View File

Binary file not shown.

View File

@@ -110,17 +110,20 @@ design:
underline: false
use_external_link_icon: true
header:
name_font_family: Source Sans 3
name_font_size: 30pt
name_bold: true
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: Source Sans 3
separator_between_connections: ''
use_icons_for_connections: true
alignment: center
section_titles:
type: with-parial-line
font_family: Source Sans 3
font_size: 1.4em
bold: true
small_caps: false
@@ -222,5 +225,5 @@ locale:
- November
- December
rendercv_settings:
date: '2025-01-26'
date: '2025-02-01'
bold_keywords: []

View File

Binary file not shown.

View File

@@ -101,7 +101,7 @@ design:
links: '#004f90'
last_updated_date_and_page_numbering: grey
text:
font_family: Noto Sans
font_family: Raleway
font_size: 10pt
leading: 0.6em
alignment: justified
@@ -110,17 +110,20 @@ design:
underline: false
use_external_link_icon: false
header:
name_font_family: Raleway
name_font_size: 30pt
name_bold: false
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: Raleway
separator_between_connections: ''
use_icons_for_connections: true
alignment: left
section_titles:
type: with-parial-line
font_family: Raleway
font_size: 1.4em
bold: false
small_caps: false
@@ -216,5 +219,5 @@ locale:
- November
- December
rendercv_settings:
date: '2025-01-26'
date: '2025-02-01'
bold_keywords: []

View File

Binary file not shown.

View File

@@ -110,17 +110,20 @@ design:
underline: true
use_external_link_icon: false
header:
name_font_family: XCharter
name_font_size: 25pt
name_bold: false
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: XCharter
separator_between_connections: '|'
use_icons_for_connections: false
alignment: center
section_titles:
type: with-parial-line
font_family: XCharter
font_size: 1.2em
bold: true
small_caps: false
@@ -216,5 +219,5 @@ locale:
- November
- December
rendercv_settings:
date: '2025-01-26'
date: '2025-02-01'
bold_keywords: []

View File

Binary file not shown.

View File

@@ -110,17 +110,20 @@ design:
underline: true
use_external_link_icon: false
header:
name_font_family: XCharter
name_font_size: 25pt
name_bold: false
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: XCharter
separator_between_connections: ''
use_icons_for_connections: true
alignment: left
section_titles:
type: moderncv
font_family: XCharter
font_size: 1.4em
bold: false
small_caps: false
@@ -215,5 +218,5 @@ locale:
- November
- December
rendercv_settings:
date: '2025-01-26'
date: '2025-02-01'
bold_keywords: []

View File

Binary file not shown.

View File

@@ -110,17 +110,20 @@ design:
underline: false
use_external_link_icon: true
header:
name_font_family: Source Sans 3
name_font_size: 30pt
name_bold: true
photo_width: 3.5cm
vertical_space_between_name_and_connections: 0.7cm
vertical_space_between_connections_and_first_section: 0.7cm
horizontal_space_between_connections: 0.5cm
connections_font_family: Source Sans 3
separator_between_connections: ''
use_icons_for_connections: true
alignment: center
section_titles:
type: with-parial-line
font_family: New Computer Modern
font_size: 1.4em
bold: true
small_caps: false
@@ -226,5 +229,5 @@ locale:
- November
- December
rendercv_settings:
date: '2025-01-26'
date: '2025-02-01'
bold_keywords: []

View File

@@ -12,7 +12,7 @@
right-content: [
((* endif *))
((* if cv.name *))
= <<cv.name>>
= #name
((* endif *))
// Print connections:

View File

@@ -22,6 +22,7 @@
#let design-colors-name = <<design.colors.name.as_rgb()>>
#let design-colors-connections = <<design.colors.connections.as_rgb()>>
#let design-colors-links = <<design.colors.links.as_rgb()>>
#let design-section-titles-font-family = "<<design.section_titles.font_family>>"
#let design-section-titles-bold = <<design.section_titles.bold|lower>>
#let design-section-titles-line-thickness = <<design.section_titles.line_thickness>>
#let design-section-titles-font-size = <<design.section_titles.font_size>>
@@ -37,8 +38,10 @@
#let design-text-date-and-location-column-alignment = <<design.text.date_and_location_column_alignment>>
#let design-header-photo-width = <<design.header.photo_width>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
#let design-header-name-font-family = "<<design.header.name_font_family>>"
#let design-header-name-font-size = <<design.header.name_font_size>>
#let design-header-name-bold = <<design.header.name_bold|lower>>
#let design-header-connections-font-family = "<<design.header.connections_font_family>>"
#let design-header-vertical-space-between-name-and-connections = <<design.header.vertical_space_between_name_and_connections>>
#let design-header-vertical-space-between-connections-and-first-section = <<design.header.vertical_space_between_connections_and_first_section>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
@@ -190,6 +193,7 @@
#set par(spacing: 0pt)
#set align(design-header-alignment)
#set text(
font: design-header-name-font-family,
weight: header-font-weight,
size: design-header-name-font-size,
fill: design-colors-name,
@@ -210,6 +214,7 @@
#set align(left)
#set text(size: (1em / 1.2)) // reset
#set text(
font: design-section-titles-font-family,
size: (design-section-titles-font-size),
weight: section-title-font-weight,
fill: design-colors-section-titles,
@@ -294,6 +299,8 @@
}
#let connections(connections-list) = context {
set text(fill: design-colors-connections, font: design-header-connections-font-family)
set par(leading: design-text-leading*1.7, justify: false)
let list-of-connections = ()
let separator = (
h(design-header-horizontal-space-between-connections / 2, weak: true)
@@ -329,8 +336,6 @@
list-of-connections.push(connections-list.slice(starting-index, ending-index).join(separator))
starting-index = ending-index
}
set text(fill: design-colors-connections)
set par(leading: design-text-leading*1.7, justify: false)
align(list-of-connections.join(linebreak()), design-header-alignment)
v(design-header-vertical-space-between-connections-and-first-section - design-section-titles-vertical-space-above)
}

View File

@@ -12,7 +12,7 @@
right-content: [
((* endif *))
((* if cv.name *))
= <<cv.name>>
= #name
((* endif *))
// Print connections:

View File

@@ -22,6 +22,7 @@
#let design-colors-name = <<design.colors.name.as_rgb()>>
#let design-colors-connections = <<design.colors.connections.as_rgb()>>
#let design-colors-links = <<design.colors.links.as_rgb()>>
#let design-section-titles-font-family = "<<design.section_titles.font_family>>"
#let design-section-titles-bold = <<design.section_titles.bold|lower>>
#let design-section-titles-line-thickness = <<design.section_titles.line_thickness>>
#let design-section-titles-font-size = <<design.section_titles.font_size>>
@@ -37,8 +38,10 @@
#let design-text-date-and-location-column-alignment = <<design.text.date_and_location_column_alignment>>
#let design-header-photo-width = <<design.header.photo_width>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
#let design-header-name-font-family = "<<design.header.name_font_family>>"
#let design-header-name-font-size = <<design.header.name_font_size>>
#let design-header-name-bold = <<design.header.name_bold|lower>>
#let design-header-connections-font-family = "<<design.header.connections_font_family>>"
#let design-header-vertical-space-between-name-and-connections = <<design.header.vertical_space_between_name_and_connections>>
#let design-header-vertical-space-between-connections-and-first-section = <<design.header.vertical_space_between_connections_and_first_section>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
@@ -190,6 +193,7 @@
#set par(spacing: 0pt)
#set align(design-header-alignment)
#set text(
font: design-header-name-font-family,
weight: header-font-weight,
size: design-header-name-font-size,
fill: design-colors-name,
@@ -210,6 +214,7 @@
#set align(left)
#set text(size: (1em / 1.2)) // reset
#set text(
font: design-section-titles-font-family,
size: (design-section-titles-font-size),
weight: section-title-font-weight,
fill: design-colors-section-titles,
@@ -294,6 +299,8 @@
}
#let connections(connections-list) = context {
set text(fill: design-colors-connections, font: design-header-connections-font-family)
set par(leading: design-text-leading*1.7, justify: false)
let list-of-connections = ()
let separator = (
h(design-header-horizontal-space-between-connections / 2, weak: true)
@@ -329,8 +336,6 @@
list-of-connections.push(connections-list.slice(starting-index, ending-index).join(separator))
starting-index = ending-index
}
set text(fill: design-colors-connections)
set par(leading: design-text-leading*1.7, justify: false)
align(list-of-connections.join(linebreak()), design-header-alignment)
v(design-header-vertical-space-between-connections-and-first-section - design-section-titles-vertical-space-above)
}

View File

@@ -9,13 +9,17 @@ class Page(o.Page):
show_page_numbering: bool = o.page_show_page_numbering_field_info
o.header_name_font_family_field_info.default = "Raleway"
o.header_connections_font_family_field_info.default = "Raleway"
o.header_name_bold_field_info.default = False
o.header_alignment_field_info.default = "left"
class Header(o.Header):
name_font_family: o.FontFamily = o.header_name_font_family_field_info
name_bold: bool = o.header_name_bold_field_info
alignment: o.Alignment = o.header_alignment_field_info
connections_font_family: o.FontFamily = o.header_connections_font_family_field_info
o.links_use_external_link_icon_field_info.default = False
@@ -25,17 +29,19 @@ class Links(o.Links):
use_external_link_icon: bool = o.links_use_external_link_icon_field_info
o.text_font_family_field_info.default = "Noto Sans"
o.text_font_family_field_info.default = "Raleway"
class Text(o.Text):
font_family: o.FontFamily = o.text_font_family_field_info
o.section_titles_font_family_field_info.default = "Raleway"
o.section_titles_bold_field_info.default = False
class SectionTitles(o.SectionTitles):
font_family: o.FontFamily = o.section_titles_font_family_field_info
bold: bool = o.section_titles_bold_field_info

View File

@@ -12,7 +12,7 @@
right-content: [
((* endif *))
((* if cv.name *))
= <<cv.name>>
= #name
((* endif *))
// Print connections:

View File

@@ -22,6 +22,7 @@
#let design-colors-name = <<design.colors.name.as_rgb()>>
#let design-colors-connections = <<design.colors.connections.as_rgb()>>
#let design-colors-links = <<design.colors.links.as_rgb()>>
#let design-section-titles-font-family = "<<design.section_titles.font_family>>"
#let design-section-titles-bold = <<design.section_titles.bold|lower>>
#let design-section-titles-line-thickness = <<design.section_titles.line_thickness>>
#let design-section-titles-font-size = <<design.section_titles.font_size>>
@@ -37,8 +38,10 @@
#let design-text-date-and-location-column-alignment = <<design.text.date_and_location_column_alignment>>
#let design-header-photo-width = <<design.header.photo_width>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
#let design-header-name-font-family = "<<design.header.name_font_family>>"
#let design-header-name-font-size = <<design.header.name_font_size>>
#let design-header-name-bold = <<design.header.name_bold|lower>>
#let design-header-connections-font-family = "<<design.header.connections_font_family>>"
#let design-header-vertical-space-between-name-and-connections = <<design.header.vertical_space_between_name_and_connections>>
#let design-header-vertical-space-between-connections-and-first-section = <<design.header.vertical_space_between_connections_and_first_section>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
@@ -190,6 +193,7 @@
#set par(spacing: 0pt)
#set align(design-header-alignment)
#set text(
font: design-header-name-font-family,
weight: header-font-weight,
size: design-header-name-font-size,
fill: design-colors-name,
@@ -210,6 +214,7 @@
#set align(left)
#set text(size: (1em / 1.2)) // reset
#set text(
font: design-section-titles-font-family,
size: (design-section-titles-font-size),
weight: section-title-font-weight,
fill: design-colors-section-titles,
@@ -294,6 +299,8 @@
}
#let connections(connections-list) = context {
set text(fill: design-colors-connections, font: design-header-connections-font-family)
set par(leading: design-text-leading*1.7, justify: false)
let list-of-connections = ()
let separator = (
h(design-header-horizontal-space-between-connections / 2, weak: true)
@@ -329,8 +336,6 @@
list-of-connections.push(connections-list.slice(starting-index, ending-index).join(separator))
starting-index = ending-index
}
set text(fill: design-colors-connections)
set par(leading: design-text-leading*1.7, justify: false)
align(list-of-connections.join(linebreak()), design-header-alignment)
v(design-header-vertical-space-between-connections-and-first-section - design-section-titles-vertical-space-above)
}

View File

@@ -11,19 +11,23 @@ class Page(o.Page):
show_page_numbering: bool = o.page_show_page_numbering_field_info
o.header_name_font_family_field_info.default = "XCharter"
o.header_separator_between_connections_field_info.default = "|"
o.header_use_icons_for_connections_field_info.default = False
o.header_name_bold_field_info.default = False
o.header_name_font_size_field_info = "25pt"
o.header_connections_font_family_field_info.default = "XCharter"
class Header(o.Header):
name_font_family: o.FontFamily = o.header_name_font_family_field_info
name_font_size: o.TypstDimension = o.header_name_font_size_field_info
name_bold: bool = o.header_name_bold_field_info
separator_between_connections: str = (
o.header_separator_between_connections_field_info
)
use_icons_for_connections: bool = o.header_use_icons_for_connections_field_info
connections_font_family: o.FontFamily = o.header_connections_font_family_field_info
o.colors_name_field_info.default = "rgb(0,0,0)"
@@ -61,9 +65,11 @@ o.section_titles_type_field_info.default = "with-full-line"
o.section_titles_vertical_space_above_field_info.default = "0.55cm"
o.section_titles_vertical_space_below_field_info.default = "0.3cm"
o.section_titles_font_size_field_info.default = "1.2em"
o.section_titles_font_family_field_info.default = "XCharter"
class SectionTitles(o.SectionTitles):
font_family: o.FontFamily = o.section_titles_font_family_field_info
line_type: o.SectionTitleType = o.section_titles_type_field_info
vertical_space_above: o.TypstDimension = (
o.section_titles_vertical_space_above_field_info

View File

@@ -12,7 +12,7 @@
right-content: [
((* endif *))
((* if cv.name *))
= <<cv.name>>
= #name
((* endif *))
// Print connections:

View File

@@ -22,6 +22,7 @@
#let design-colors-name = <<design.colors.name.as_rgb()>>
#let design-colors-connections = <<design.colors.connections.as_rgb()>>
#let design-colors-links = <<design.colors.links.as_rgb()>>
#let design-section-titles-font-family = "<<design.section_titles.font_family>>"
#let design-section-titles-bold = <<design.section_titles.bold|lower>>
#let design-section-titles-line-thickness = <<design.section_titles.line_thickness>>
#let design-section-titles-font-size = <<design.section_titles.font_size>>
@@ -37,8 +38,10 @@
#let design-text-date-and-location-column-alignment = <<design.text.date_and_location_column_alignment>>
#let design-header-photo-width = <<design.header.photo_width>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
#let design-header-name-font-family = "<<design.header.name_font_family>>"
#let design-header-name-font-size = <<design.header.name_font_size>>
#let design-header-name-bold = <<design.header.name_bold|lower>>
#let design-header-connections-font-family = "<<design.header.connections_font_family>>"
#let design-header-vertical-space-between-name-and-connections = <<design.header.vertical_space_between_name_and_connections>>
#let design-header-vertical-space-between-connections-and-first-section = <<design.header.vertical_space_between_connections_and_first_section>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
@@ -190,6 +193,7 @@
#set par(spacing: 0pt)
#set align(design-header-alignment)
#set text(
font: design-header-name-font-family,
weight: header-font-weight,
size: design-header-name-font-size,
fill: design-colors-name,
@@ -210,6 +214,7 @@
#set align(left)
#set text(size: (1em / 1.2)) // reset
#set text(
font: design-section-titles-font-family,
size: (design-section-titles-font-size),
weight: section-title-font-weight,
fill: design-colors-section-titles,
@@ -294,6 +299,8 @@
}
#let connections(connections-list) = context {
set text(fill: design-colors-connections, font: design-header-connections-font-family)
set par(leading: design-text-leading*1.7, justify: false)
let list-of-connections = ()
let separator = (
h(design-header-horizontal-space-between-connections / 2, weak: true)
@@ -329,8 +336,6 @@
list-of-connections.push(connections-list.slice(starting-index, ending-index).join(separator))
starting-index = ending-index
}
set text(fill: design-colors-connections)
set par(leading: design-text-leading*1.7, justify: false)
align(list-of-connections.join(linebreak()), design-header-alignment)
v(design-header-vertical-space-between-connections-and-first-section - design-section-titles-vertical-space-above)
}

View File

@@ -2,15 +2,19 @@ from typing import Literal, Optional
import rendercv.themes.options as o
o.header_name_font_family_field_info.default = "XCharter"
o.header_name_bold_field_info.default = False
o.header_name_font_size_field_info = "25pt"
o.header_alignment_field_info.default = "left"
o.header_connections_font_family_field_info.default = "XCharter"
class Header(o.Header):
name_font_family: o.FontFamily = o.header_name_font_family_field_info
name_font_size: o.TypstDimension = o.header_name_font_size_field_info
name_bold: bool = o.header_name_bold_field_info
alignment: o.Alignment = o.header_alignment_field_info
connections_font_family: o.FontFamily = o.header_connections_font_family_field_info
o.links_underline_field_info.default = True
@@ -37,9 +41,11 @@ o.section_titles_vertical_space_above_field_info.default = "0.55cm"
o.section_titles_vertical_space_below_field_info.default = "0.3cm"
o.section_titles_font_size_field_info.default = "1.4em"
o.section_titles_line_thickness_field_info.default = "0.15cm"
o.section_titles_font_family_field_info.default = "XCharter"
class SectionTitles(o.SectionTitles):
font_family: o.FontFamily = o.section_titles_font_family_field_info
type: o.SectionTitleType = o.section_titles_type_field_info
vertical_space_above: o.TypstDimension = (
o.section_titles_vertical_space_above_field_info

View File

@@ -9,6 +9,7 @@ from typing import Annotated, Literal, Optional
import pydantic
import pydantic_extra_types.color as pydantic_color
import rendercv_fonts
from ..data.models.base import RenderCVBaseModelWithoutExtraKeys
@@ -28,18 +29,14 @@ TypstDimension = Annotated[
str,
pydantic.AfterValidator(validate_typst_dimension),
]
FontFamily = Literal[
available_font_families = [
"Libertinus Serif",
"New Computer Modern",
"DejaVu Sans Mono",
"Source Sans 3",
"Roboto",
"Open Sans",
"Ubuntu",
"Noto Sans",
"Mukta",
"XCharter",
*rendercv_fonts.available_font_families,
]
available_font_families.remove("Font Awesome 6")
FontFamily = Literal[*available_font_families]
BulletPoint = Literal["", "", "-", "", "", "", "", ""]
PageSize = Literal[
"a0",
@@ -236,6 +233,11 @@ class Links(RenderCVBaseModelWithoutExtraKeys):
use_external_link_icon: bool = links_use_external_link_icon_field_info
header_name_font_family_field_info = pydantic.Field(
default="Source Sans 3",
title="Name Font Family",
description="The font family of the name in the header.",
)
header_name_font_size_field_info = pydantic.Field(
default="30pt",
title="Name Font Size",
@@ -275,6 +277,11 @@ header_separator_between_connections_field_info = pydantic.Field(
title="Separator Between Connections",
description="The separator between the connections in the header.",
)
header_connections_font_family_field_info = pydantic.Field(
default="Source Sans 3",
title="Connections Font Family",
description="The font family of the connections in the header.",
)
header_use_icons_for_connections_field_info = pydantic.Field(
default=True,
title="Use Icons for Connections",
@@ -291,6 +298,7 @@ header_alignment_field_info = pydantic.Field(
class Header(RenderCVBaseModelWithoutExtraKeys):
name_font_family: FontFamily = header_name_font_family_field_info
name_font_size: TypstDimension = header_name_font_size_field_info
name_bold: bool = header_name_bold_field_info
photo_width: TypstDimension = header_photo_width_field_info
@@ -303,11 +311,17 @@ class Header(RenderCVBaseModelWithoutExtraKeys):
horizontal_space_between_connections: TypstDimension = (
header_horizontal_space_connections_field_info
)
connections_font_family: FontFamily = header_connections_font_family_field_info
separator_between_connections: str = header_separator_between_connections_field_info
use_icons_for_connections: bool = header_use_icons_for_connections_field_info
alignment: Alignment = header_alignment_field_info
section_titles_font_family_field_info = pydantic.Field(
default="Source Sans 3",
title="Font Family",
description="The font family of the section titles.",
)
section_titles_font_size_field_info = pydantic.Field(
default="1.4em",
title="Font Size",
@@ -347,6 +361,7 @@ section_titles_small_caps_field_info = pydantic.Field(
class SectionTitles(RenderCVBaseModelWithoutExtraKeys):
type: SectionTitleType = section_titles_type_field_info
font_family: FontFamily = section_titles_font_family_field_info
font_size: TypstDimension = section_titles_font_size_field_info
bold: bool = section_titles_bold_field_info
small_caps: bool = section_titles_small_caps_field_info

View File

@@ -12,7 +12,7 @@
right-content: [
((* endif *))
((* if cv.name *))
= <<cv.name>>
= #name
((* endif *))
// Print connections:

View File

@@ -22,6 +22,7 @@
#let design-colors-name = <<design.colors.name.as_rgb()>>
#let design-colors-connections = <<design.colors.connections.as_rgb()>>
#let design-colors-links = <<design.colors.links.as_rgb()>>
#let design-section-titles-font-family = "<<design.section_titles.font_family>>"
#let design-section-titles-bold = <<design.section_titles.bold|lower>>
#let design-section-titles-line-thickness = <<design.section_titles.line_thickness>>
#let design-section-titles-font-size = <<design.section_titles.font_size>>
@@ -37,8 +38,10 @@
#let design-text-date-and-location-column-alignment = <<design.text.date_and_location_column_alignment>>
#let design-header-photo-width = <<design.header.photo_width>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
#let design-header-name-font-family = "<<design.header.name_font_family>>"
#let design-header-name-font-size = <<design.header.name_font_size>>
#let design-header-name-bold = <<design.header.name_bold|lower>>
#let design-header-connections-font-family = "<<design.header.connections_font_family>>"
#let design-header-vertical-space-between-name-and-connections = <<design.header.vertical_space_between_name_and_connections>>
#let design-header-vertical-space-between-connections-and-first-section = <<design.header.vertical_space_between_connections_and_first_section>>
#let design-header-use-icons-for-connections = <<design.header.use_icons_for_connections|lower>>
@@ -190,6 +193,7 @@
#set par(spacing: 0pt)
#set align(design-header-alignment)
#set text(
font: design-header-name-font-family,
weight: header-font-weight,
size: design-header-name-font-size,
fill: design-colors-name,
@@ -210,6 +214,7 @@
#set align(left)
#set text(size: (1em / 1.2)) // reset
#set text(
font: design-section-titles-font-family,
size: (design-section-titles-font-size),
weight: section-title-font-weight,
fill: design-colors-section-titles,
@@ -294,6 +299,8 @@
}
#let connections(connections-list) = context {
set text(fill: design-colors-connections, font: design-header-connections-font-family)
set par(leading: design-text-leading*1.7, justify: false)
let list-of-connections = ()
let separator = (
h(design-header-horizontal-space-between-connections / 2, weak: true)
@@ -329,8 +336,6 @@
list-of-connections.push(connections-list.slice(starting-index, ending-index).join(separator))
starting-index = ending-index
}
set text(fill: design-colors-connections)
set par(leading: design-text-leading*1.7, justify: false)
align(list-of-connections.join(linebreak()), design-header-alignment)
v(design-header-vertical-space-between-connections-and-first-section - design-section-titles-vertical-space-above)
}

View File

@@ -15,6 +15,15 @@ class Colors(o.Colors):
section_titles: pydantic_color.Color = o.colors_section_titles_field_info
o.header_name_font_family_field_info.default = "New Computer Modern"
o.header_connections_font_family_field_info.default = "New Computer Modern"
class Header(o.Header):
name_font_family: o.FontFamily = o.header_name_font_family_field_info
connections_font_family: o.FontFamily = o.header_connections_font_family_field_info
o.text_font_family_field_info.default = "New Computer Modern"
@@ -23,9 +32,11 @@ class Text(o.Text):
o.section_titles_type_field_info.default = "with-full-line"
o.section_titles_font_family_field_info.default = "New Computer Modern"
class SectionTitles(o.SectionTitles):
font_family: o.FontFamily = o.section_titles_font_family_field_info
line_type: o.SectionTitleType = o.section_titles_type_field_info