View previous topic :: View next topic |
Author |
Message |
Wafficus n00b

Joined: 17 Jan 2021 Posts: 1
|
Posted: Sun Jan 17, 2021 8:12 am Post subject: Issues With Fonts Within exwm > vterm & urxvt |
|
|
Hi there,
I have been dealing with some weird unicode issues regarding the "Inconsolata" font I tried utilizing from 'emerge'.
The issue that I was experiencing was that even though I had the correct USE flags for Emacs fonts, it was not rendering unicode characters within terminal programs like 'w3m' correctly.
My current setup is exwm (Emacs Window Manager) > vterm (terminal emulator for Emacs).
I've been told that the Inconsolata font doesn't render certain unicode characters correctly, hence why I was seeing blocks for some characters in w3m.
Also,I noticed that urxvt straight up would just show blocks of unicode characters for the username before the $ terminal prompt
So, I tried utilizing this font from GitHub which I stuffed into my /usr/share/fonts/scientifica directory as root.
However, now it is a italics looking mess, see this screenshot:
https://ibb.co/2kZMhYK
This is what its supposed to look like:
https://github.com/NerdyPepper/scientifica/blob/master/img/sci4.png
Howe do I get rid of this mess?
Here are the USE flags for Emacs:
Code: | app-editors/emacs dynamic-loading imagemagick json libxml2 sound harfbuzz freetype xft |
My emacs is setup for a literate config that utilizes ~/.emacs.d/configuration.org and ~/.emacs.d/init.el
I customized the font using M-x customize which gave me changes in 'init.el'
My '~/.emacs.d/init.el' looks like this:
Code: | (require 'package)
(require 'exwm)
(require 'exwm-config)
(exwm-config-example)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; Install packages if they're not present on the current machine
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(unless (package-installed-p 'spacemacs-theme)
(package-refresh-contents)
(package-install 'spacemacs-theme))
(unless (package-installed-p 'helm)
(package-refresh-contents)
(package-install 'helm))
(unless (package-installed-p 'hydra)
(package-refresh-contents)
(package-install 'hydra))
(unless (package-installed-p 'emmet-mode)
(package-refresh-contents)
(package-install 'emmet-mode))
(unless (package-installed-p 'htmlize)
(package-refresh-contents)
(package-install 'htmlize))
(unless (package-installed-p 'beacon)
(package-refresh-contents)
(package-install 'beacon))
(unless (package-installed-p 'which-key)
(package-refresh-contents)
(package-install 'which-key))
(unless (package-installed-p 'exwm)
(package-refresh-contents)
(package-install 'exwm))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes '(spacemacs-dark))
'(custom-safe-themes
'("bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" default))
'(inhibit-startup-screen t)
'(package-selected-packages
'(emacs-dashboard dashboard rainbow-delimiters sudo-edit hungry-delete rainbow-mode avy use-package spacemacs-theme helm hydra emmet-mode htmlize)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :extend nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 150 :width normal :foundry "1ASC" :family "scientifica")))))
(org-babel-load-file "~/.emacs.d/configuration.org")
|
Here's my ~/.Xresources config as well:
Code: | ! special
*.foreground: #e4dedc
*.background: #020202
*.cursorColor: #e4dedc
! black
*.color0: #040403
*.color8: #f0a1ca
! red
*.color1: #151211
*.color9: #fd941d
! green
*.color2: #292422
*.color10: #efa97d
! yellow
*.color3: #443c39
*.color11: #869545
! blue
*.color4: #655b56
*.color12: #ac88f1
! magenta
*.color5: #8f807a
*.color13: #849625
! cyan
*.color6: #beaca4
*.color14: #b0c551
! white
*.color7: #e7e1df
*.color15: #39c69b
! Font Sizes
! Note: Because we are using font size based extensions later on,
! set this to the max font size value you want to see on screen
! The following is for 'Just Werks' machine setups:
! urxvt.font: xft:Inconsolata:pixelsize=18
! The following is to utilize 'Scientifica' font (https://github.com/NerdyPepper/scientifica)
urxvt.font: xft:scientifica:pixelsize=18
! Other Adjustments
URxvt.scrollBar: false
! Extensions
! Use this GitHub page if you are ever transferring the perl based
! extension to a different computer:
! https://github.com/simmel/urxvt-resize-font
urxvt.perl-ext-common: default,resize-font
! Keybindings
URxvt.keysym.C-minus: resize-font:smaller
URxvt.keysym.C-plus: resize-font:bigger
URxvt.keysym.C-equal: resize-font:reset
URxvt.keysym.C-question: resize-font:show
! Font Size Adjustments:
URxvt.resize-font.step: 2
! Transparency for urxvt:
URxvt.depth: 32
URxvt.transparent: true
URxvt.tintColor: white
! Set .shading to: 20 for slight transparency
! Set .shading to: 40 for fuller transparency
URxvt.shading: 30
! Urxvt.background: [50]#000000
! Changing Font Sizes With C-0, C-+, and C-=:
! :Bind C-0, C-+ and C-= to activate small, medium, and big font size resp.
! URxvt.keysym.C-0: command:\033]710;-*-Inconsolata-medium-r-normal--13-*-*-*-*-*-*-*\007
! URxvt.keysym.C-minus: command:\033]710;-*-Inconsolata-medium-r-normal--15-*-*-*-*-*-*-*\007
! URxvt.keysym.C-equal: command:\033]710;-*-Inconsolata-medium-r-normal--16-*-*-*-*-*-*-*\007 |
[Moderator edit: added [code] tags to preserve output layout. -Hu] |
|
Back to top |
|
 |
gryf n00b


Joined: 09 Jun 2004 Posts: 50
|
Posted: Fri Feb 12, 2021 4:00 pm Post subject: |
|
|
That looks weird:
Code: | gryf@spasm ~ $ fc-list |grep -i scient
/home/gryf/.fonts/scient/scientificaItalic.ttf: scientifica:style=Medium
/home/gryf/.fonts/scient/scientificaBold.ttf: scientifica:style=Bold
/home/gryf/.fonts/scient/scientifica.ttf: scientifica:style=Medium
|
Let's take DejaVu for comparison:
Code: | gryf@spasm ~ $ fc-list |grep -i dejavusansmo
/usr/share/fonts/dejavu/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans Mono:style=Bold Oblique
/usr/share/fonts/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/share/fonts/dejavu/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
|
or Hack:
Code: | gryf@spasm ~ $ fc-list |grep -i nerd|grep Hack
/home/gryf/.fonts/Nerd Fonts/Hack Italic Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Italic
/home/gryf/.fonts/Nerd Fonts/Hack Bold Italic Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Bold Italic
/home/gryf/.fonts/Nerd Fonts/Hack Regular Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Regular
/home/gryf/.fonts/Nerd Fonts/Hack Bold Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Bold
|
Seems like there is wrong style applied on the italic font (should be Italic or Oblique), just like for DejaVu or Hack fonts. Terminal has chosen first Medium font, which happens to be italic. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|