fix: prevent degree title clipping and hyphenation in classic theme#667
Closed
sandokanCat wants to merge 1 commit intorendercv:mainfrom
Closed
fix: prevent degree title clipping and hyphenation in classic theme#667sandokanCat wants to merge 1 commit intorendercv:mainfrom
sandokanCat wants to merge 1 commit intorendercv:mainfrom
Conversation
Member
|
Thank you. This PR should go to the Typst package of RenderCV: https://github.com/rendercv/rendercv-typst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a layout issue in the classic theme where degree titles are often clipped or hyphenated incorrectly due to a very narrow hardcoded column width.
The Problem
In the current implementation, the degree-column in the Typst template has a fixed width of 1cm. While this might suffice for short acronyms like "GPA", it is insufficient for many professional degree titles, especially in languages like Spanish or Catalan, where titles like "Certificado Profesional" or "Máster" are common. This leads to:
Aggressive and often incorrect hyphenation (e.g., "certifica-do").
Text clipping or overlapping when hyphenation is not possible.
Poor visual separation between the degree title and the institution name.
Proposed Changes
Increased Column Width: Adjusted the degree-column-width from 1cm to 2.4cm in the Typst preamble to accommodate longer titles comfortably.
Disabled Hyphenation: Added #set text(hyphenate: false) specifically for the degree column to ensure titles remain intact and readable.
Improved Gutter Spacing: Added an additional 0.4cm to the column-gutter between the degree and the main column to improve legibility and provide better visual breathing room.
Template Override: The changes were implemented as a clean override in the education-entry function within the Typst rendering logic.
Impact
Users with non-English CVs or those with long degree titles will see a significant improvement in the professional appearance of their education section, with no more broken words or cramped layouts.