diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gmdocument.c | 6 | ||||
-rw-r--r-- | src/ui/color.c | 2 | ||||
-rw-r--r-- | src/ui/text.c | 14 | ||||
-rw-r--r-- | src/ui/text.h | 2 | ||||
-rw-r--r-- | src/ui/util.c | 2 |
5 files changed, 21 insertions, 5 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index e2696085..f800f6ed 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -799,9 +799,9 @@ void setThemeSeed_GmDocument(iGmDocument *d, const iBlock *seed) { | |||
799 | 799 | ||
800 | if (delta_Color(get_Color(tmHeading3_ColorId), get_Color(tmParagraph_ColorId)) <= 80) { | 800 | if (delta_Color(get_Color(tmHeading3_ColorId), get_Color(tmParagraph_ColorId)) <= 80) { |
801 | /* Smallest headings may be too close to body text color. */ | 801 | /* Smallest headings may be too close to body text color. */ |
802 | iHSLColor clr = get_HSLColor(tmParagraph_ColorId); | 802 | // iHSLColor clr = get_HSLColor(tmParagraph_ColorId); |
803 | clr.lum = iMax(0.5f, clr.lum - 0.15f); | 803 | // clr.lum = iMax(0.5f, clr.lum - 0.15f); |
804 | setHsl_Color(tmParagraph_ColorId, clr); | 804 | //setHsl_Color(tmParagraph_ColorId, clr); |
805 | setHsl_Color(tmHeading3_ColorId, | 805 | setHsl_Color(tmHeading3_ColorId, |
806 | addSatLum_HSLColor(get_HSLColor(tmHeading3_ColorId), 0, 0.15f)); | 806 | addSatLum_HSLColor(get_HSLColor(tmHeading3_ColorId), 0, 0.15f)); |
807 | } | 807 | } |
diff --git a/src/ui/color.c b/src/ui/color.c index 9d2c4132..2cf7ebbd 100644 --- a/src/ui/color.c +++ b/src/ui/color.c | |||
@@ -199,7 +199,7 @@ void setThemePalette_Color(enum iColorTheme theme) { | |||
199 | copy_(uiAnnotation_ColorId, gray50_ColorId); | 199 | copy_(uiAnnotation_ColorId, gray50_ColorId); |
200 | copy_(uiIcon_ColorId, brown_ColorId); | 200 | copy_(uiIcon_ColorId, brown_ColorId); |
201 | copy_(uiIconHover_ColorId, brown_ColorId); | 201 | copy_(uiIconHover_ColorId, brown_ColorId); |
202 | copy_(uiSeparator_ColorId, gray75_ColorId); | 202 | copy_(uiSeparator_ColorId, gray50_ColorId); |
203 | copy_(uiMarked_ColorId, cyan_ColorId); | 203 | copy_(uiMarked_ColorId, cyan_ColorId); |
204 | copy_(uiMatching_ColorId, orange_ColorId); | 204 | copy_(uiMatching_ColorId, orange_ColorId); |
205 | break; | 205 | break; |
diff --git a/src/ui/text.c b/src/ui/text.c index eb6c66e8..8d8aa19c 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -166,7 +166,7 @@ static void initFonts_Text_(iText *d) { | |||
166 | const iBlock *italicFont = &fontNunitoLightItalic_Embedded; | 166 | const iBlock *italicFont = &fontNunitoLightItalic_Embedded; |
167 | const iBlock *boldFont = &fontNunitoExtraBold_Embedded; | 167 | const iBlock *boldFont = &fontNunitoExtraBold_Embedded; |
168 | const iBlock *lightFont = &fontNunitoExtraLight_Embedded; | 168 | const iBlock *lightFont = &fontNunitoExtraLight_Embedded; |
169 | float scaling = 1.0f; /* additional glyph scaling (<=1), to increase line spacing */ | 169 | float scaling = 1.0f; /* glyph scaling (<=1.0), for increasing line spacing */ |
170 | if (d->contentFont == firaSans_TextFont) { | 170 | if (d->contentFont == firaSans_TextFont) { |
171 | regularFont = &fontFiraSansRegular_Embedded; | 171 | regularFont = &fontFiraSansRegular_Embedded; |
172 | italicFont = &fontFiraSansItalic_Embedded; | 172 | italicFont = &fontFiraSansItalic_Embedded; |
@@ -174,6 +174,18 @@ static void initFonts_Text_(iText *d) { | |||
174 | lightFont = &fontFiraSansLight_Embedded; | 174 | lightFont = &fontFiraSansLight_Embedded; |
175 | scaling = 0.85f; | 175 | scaling = 0.85f; |
176 | } | 176 | } |
177 | else if (d->contentFont == ebGaramond_TextFont) { | ||
178 | regularFont = &fontEBGaramondRegular_Embedded; | ||
179 | italicFont = &fontEBGaramondItalic_Embedded; | ||
180 | boldFont = &fontEBGaramondBold_Embedded; | ||
181 | lightFont = &fontLiterataExtraLightopsz18_Embedded; | ||
182 | } | ||
183 | else if (d->contentFont == literata_TextFont) { | ||
184 | regularFont = &fontLiterataRegularopsz14_Embedded; | ||
185 | italicFont = &fontLiterataLightItalicopsz14_Embedded; | ||
186 | boldFont = &fontLiterataBoldopsz36_Embedded; | ||
187 | lightFont = &fontLiterataExtraLightopsz18_Embedded; | ||
188 | } | ||
177 | const struct { | 189 | const struct { |
178 | const iBlock *ttf; | 190 | const iBlock *ttf; |
179 | int size; | 191 | int size; |
diff --git a/src/ui/text.h b/src/ui/text.h index fa7b9402..fe4ddef1 100644 --- a/src/ui/text.h +++ b/src/ui/text.h | |||
@@ -108,6 +108,8 @@ iLocalDef iBool isVariationSelector_Char(iChar ch) { | |||
108 | enum iTextFont { | 108 | enum iTextFont { |
109 | nunito_TextFont, | 109 | nunito_TextFont, |
110 | firaSans_TextFont, | 110 | firaSans_TextFont, |
111 | literata_TextFont, | ||
112 | ebGaramond_TextFont, | ||
111 | }; | 113 | }; |
112 | 114 | ||
113 | extern int gap_Text; /* affected by content font size */ | 115 | extern int gap_Text; /* affected by content font size */ |
diff --git a/src/ui/util.c b/src/ui/util.c index 89f71da2..c061231d 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -925,6 +925,8 @@ iWidget *makePreferences_Widget(void) { | |||
925 | /* Fonts. */ { | 925 | /* Fonts. */ { |
926 | addRadioButton_(fonts, "prefs.font.0", "Nunito", "font.set arg:0"); | 926 | addRadioButton_(fonts, "prefs.font.0", "Nunito", "font.set arg:0"); |
927 | addRadioButton_(fonts, "prefs.font.1", "Fira Sans", "font.set arg:1"); | 927 | addRadioButton_(fonts, "prefs.font.1", "Fira Sans", "font.set arg:1"); |
928 | addRadioButton_(fonts, "prefs.font.2", "Literata", "font.set arg:2"); | ||
929 | addRadioButton_(fonts, "prefs.font.3", "EB Garamond", "font.set arg:3"); | ||
928 | } | 930 | } |
929 | addChildFlags_Widget(values, iClob(fonts), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | 931 | addChildFlags_Widget(values, iClob(fonts), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); |
930 | addChild_Widget(headings, iClob(makeHeading_Widget("Line width:"))); | 932 | addChild_Widget(headings, iClob(makeHeading_Widget("Line width:"))); |