[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/svg-tag-mode 4fdc7ffbb3 23/63: Fixed font weights
From: |
ELPA Syncer |
Subject: |
[elpa] externals/svg-tag-mode 4fdc7ffbb3 23/63: Fixed font weights |
Date: |
Mon, 27 Dec 2021 15:57:58 -0500 (EST) |
branch: externals/svg-tag-mode
commit 4fdc7ffbb30175fc483dc4078664b95a5299e150
Author: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Commit: Nicolas P. Rougier <Nicolas.Rougier@inria.fr>
Fixed font weights
---
example-2.el | 18 +++++++-----------
svg-tag-mode.el | 14 +++++++++++++-
2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/example-2.el b/example-2.el
index 0e98fd8acc..a5f54c978e 100644
--- a/example-2.el
+++ b/example-2.el
@@ -17,17 +17,17 @@
(defface svg-tag-todo-face
'((t :foreground "#ffffff" :background "#FFAB91" :box "#FFAB91"
- :family "Roboto Mono" :weight light :height 120))
+ :family "Roboto Mono" :weight regular :height 120))
"Face for TODO svg tag" :group nil)
(defface svg-tag-next-face
'((t :foreground "white" :background "#673AB7" :box "#673AB7"
- :family "Roboto Mono" :weight light :height 120))
+ :family "Roboto Mono" :weight regular :height 120))
"Face for NEXT svg tag" :group nil)
(defface svg-tag-done-face
'((t :foreground "white" :background "#B0BEC5" :box "#B0BEC5"
- :family "Roboto Mono" :weight light :height 120))
+ :family "Roboto Mono" :weight regular :height 120))
"Face for DONE svg tag" :group nil)
(defface svg-tag-date-face
@@ -37,7 +37,7 @@
(defface svg-tag-org-face
'((t :foreground "black" :background "white" :box "black"
- :family "Roboto Mono" :weight light :height 120))
+ :family "Roboto Mono" :weight regular :height 120))
"Default face for svg tag" :group nil)
(setq radius 2)
@@ -75,10 +75,6 @@
;; Priorities: [#A] [#B] [#C]
;; Date: <2020-11-07 Sat>
-;; DONE Make a pull request on melpa <2020-11-07
Sat>
-;; NEXT Wait for review
-;; TODO Post on Reddit
-
-
-
-
+;; DONE Make a pull request on melpa <2020-11-07
Sat>
+;; NEXT Wait for review
+;; TODO Post on Reddit
diff --git a/svg-tag-mode.el b/svg-tag-mode.el
index a15a1aeefd..9c664e0402 100644
--- a/svg-tag-mode.el
+++ b/svg-tag-mode.el
@@ -112,6 +112,16 @@ allows to create dynamic tags."
:type '(repeat (cons (string :tag "Keyword")
(sexp :tag "Tag"))))
+;; SVG font weights translation
+(setq svg-tag--font-weights '((thin . 100)
+ (ultralight . 200)
+ (light . 300)
+ (regular . 400)
+ (medium . 500)
+ (semibold . 600)
+ (bold . 700)
+ (extrabold . 800)
+ (black . 900)))
(defun svg-tag-make (text &optional face inner-padding outer-padding radius)
"Create a SVG image displaying TEXT in a rounded box using FACE style.
@@ -126,7 +136,9 @@ INNER-PADDING, OUTER-PADDING and RADIUS controls the visual
aspect of the box."
(line-width (or (plist-get (face-attribute face :box) :line-width)
svg-tag-default-line-width))
(family (face-attribute face :family))
- (weight (face-attribute face :weight))
+;; (weight (face-attribute face :weight))
+ (weight (cdr (assoc (face-attribute face :weight)
+ svg-tag--font-weights)))
(size (/ (face-attribute face :height) 10))
(tag-char-width (window-font-width nil face))
- [elpa] externals/svg-tag-mode 60140b7526 62/63: Remove ununsed local variables., (continued)
- [elpa] externals/svg-tag-mode 60140b7526 62/63: Remove ununsed local variables., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode c78500db2c 60/63: Fix bugs (typos)., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode de9aba3f37 09/63: Fix style and naming, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 90c15ebc07 05/63: Load subr-x for string-trim, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode e9d0df33a6 12/63: Better default, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a5af3041c4 07/63: Added customizable options, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 0944bb3bce 14/63: Simplified tag setup and added custom variable for tags, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode db4d223352 18/63: Fixed documentation, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 9649055e90 20/63: Trying to fix header, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode cec780a16f 21/63: Added version, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 4fdc7ffbb3 23/63: Fixed font weights,
ELPA Syncer <=
- [elpa] externals/svg-tag-mode 609ed7cc32 24/63: Removed free variable, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 0125ceca29 22/63: Fix README, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a9e8d9e705 27/63: Fixes followign review at https://github.com/melpa/melpa/pull/7217, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 40d7820143 28/63: Moved examples into a directory, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode c0492f9046 30/63: Fixed links, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 78a343f0f3 34/63: Cleanup whitespace, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode 29ca63cdbb 36/63: Rewrote the mode using svg-lib, ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode f6adc4b772 39/63: Make sure to remove space from tag., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode a5098267c9 41/63: Updated example 2 to new tags format., ELPA Syncer, 2021/12/27
- [elpa] externals/svg-tag-mode e9a6256dee 44/63: Added org-mode screenshot, ELPA Syncer, 2021/12/27