Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Set specific folder to preview all the fonts #40

Open
gusbemacbe opened this issue Jun 1, 2020 · 10 comments
Open

[Feature Request] Set specific folder to preview all the fonts #40

gusbemacbe opened this issue Jun 1, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@gusbemacbe
Copy link

Hello,

Your fontpreview shows only the systems fonts, then I want the fontpreview to show other non-system font fonts to preview the fonts, for example:

fontpreview '/home/your_username/GitLab/fontes/Fontes de Apple e Microsoft/'
@sdushantha sdushantha added the enhancement New feature or request label Jun 1, 2020
@aeghn
Copy link

aeghn commented Jun 24, 2020

Try my fork.

However, it will only display the ttf/otf files in that directory, not recursively. You can modify line 134 to meet you needs.

@gusbemacbe
Copy link
Author

Try my fork.

However, it will only display the ttf/otf files in that directory, not recursively. You can modify line 134 to meet you needs.

@aeghn, it broke

/usr/bin/fontpreview: linha 11: /usr/bin/awk: Lista de argumentos muito longa
/usr/bin/fontpreview: linha 11: /usr/bin/sort: Lista de argumentos muito longa
/usr/bin/fontpreview: linha 69: /usr/bin/mkdir: Lista de argumentos muito longa
/usr/bin/fontpreview: linha 71: /home/gusbemacbe/.cache/ftpr/text_preview: Ficheiro ou pasta inexistente
/usr/bin/fontpreview: linha 73: /home/gusbemacbe/.cache/ftpr/text_preview_history: Ficheiro ou pasta inexistente
/usr/bin/fontpreview: linha 100: /usr/bin/fzf: Lista de argumentos muito longa
/usr/bin/fontpreview: linha 88: /usr/bin/rm: Lista de argumentos muito longa

@aeghn
Copy link

aeghn commented Jun 24, 2020

I don’t know why this happened, please describe in detail in English.

@gusbemacbe
Copy link
Author

gusbemacbe commented Jun 24, 2020

I don’t know why this happened, please describe in detail in English.

I changed my system's language to English, now the results are in English:

/usr/bin/fontpreview: line 11: /usr/bin/awk: List of arguments too long
/usr/bin/fontpreview: line 11: /usr/bin/sort: List of arguments too long
/usr/bin/fontpreview: line 69: /usr/bin/mkdir: List of arguments too long
/usr/bin/fontpreview: line 71: /home/gusbemacbe/.cache/ftpr/text_preview: No file or folder
/usr/bin/fontpreview: line 73: /home/gusbemacbe/.cache/ftpr/text_preview_history: No file or folder
/usr/bin/fontpreview: line 100: /usr/bin/fzf: List of arguments too long
/usr/bin/fontpreview: line 88: /usr/bin/rm: List of arguments too long

@aeghn
Copy link

aeghn commented Jun 24, 2020

I translated them into English by using Google Translate.

But I need more details, try to use this script by adding set -x and provide your system details.

@gusbemacbe
Copy link
Author

set -x

Hello @aeghn !

Sorry for my asbence, I went to bed.

Here are the details:

COLORTERM truecolor
DBUS_SESSION_BUS_ADDRESS unix:path=/run/user/1000/bus
DESKTOP_SESSION /usr/share/xsessions/i3-with-shmlog
DISPLAY :0
ENHANCD_COMMAND cd
ENHANCD_COMPLETION_BEHAVIOUR default
ENHANCD_COMPLETION_DEFAULT 1
ENHANCD_COMPLETION_KEYBIND '^I'
ENHANCD_DIR /home/gusbemacbe/.enhancd
ENHANCD_DISABLE_DOT 0
ENHANCD_DISABLE_HOME 0
ENHANCD_DISABLE_HYPHEN 0
ENHANCD_DOT_ARG ..
ENHANCD_FILTER fzy:fzf-tmux:fzf:peco:percol:gof:pick:icepick:sentaku:selecta
ENHANCD_HOME_ARG
ENHANCD_HYPHEN_ARG -
ENHANCD_HYPHEN_NUM 10
ENHANCD_ROOT /home/gusbemacbe/.config/fisher/github.com/b4b4r07/enhancd
ENHANCD_USE_FUZZY_MATCH 1
GTK_IM_MODULE fcitx
GTK_MODULES canberra-gtk-module:appmenu-gtk-module
HG /usr/bin/hg
HOME /home/gusbemacbe
I3SOCK /run/user/1000/i3/ipc-socket.1513
LANG pt_PT.UTF-8
LC_ADDRESS pt_PT.UTF-8
LC_CTYPE en_US.UTF-8
LC_IDENTIFICATION pt_PT.UTF-8
LC_MEASUREMENT pt_PT.UTF-8
LC_MONETARY pt_PT.UTF-8
LC_NAME pt_PT.UTF-8
LC_NUMERIC pt_PT.UTF-8
LC_PAPER pt_PT.UTF-8
LC_TELEPHONE pt_PT.UTF-8
LC_TIME pt_PT.UTF-8
LOGNAME gusbemacbe
MAIL /var/spool/mail/gusbemacbe
MKLROOT /opt/intel/mkl
NVM_BIN /home/gusbemacbe/.nvm/versions/node/v14.3.0/bin
NVM_CD_FLAGS
NVM_DIR /home/gusbemacbe/.nvm
NVM_INC /home/gusbemacbe/.nvm/versions/node/v14.3.0/include/node
OMF_CONFIG /home/gusbemacbe/.config/omf
OMF_PATH /home/gusbemacbe/.local/share/omf
PATH /home/gusbemacbe/.nvm/versions/node/v14.3.0/bin /usr/local/sbin /usr/local/bin /usr/bin /usr/lib/jvm/default/bin /usr/bin/site_perl /usr/bin/vendor_perl /usr/bin/core_perl
PWD /home/gusbemacbe/GitHub/fontpreview
QT_AUTO_SCREEN_SCALE_FACTOR 0
QT_IM_MODULE fcitx
QT_QPA_PLATFORM xcb
QT_QPA_PLATFORMTHEME qt5ct
QT_STYLE_OVERRIDE kvantum
SDIRS /home/gusbemacbe/.sdirs
SHELL /usr/bin/fish
SHLVL 3
TERM xterm-256color
TILIX_ID c9a45cbc-15ed-4067-9402-88817be7f197
UBUNTU_MENUPROXY 1
USER gusbemacbe
VIRTUAL_ENV_DISABLE_PROMPT 1
VTE_VERSION 6003
XAUTHORITY /home/gusbemacbe/.Xauthority
XDG_CACHE_HOME /home/gusbemacbe/.cache
XDG_CONFIG_HOME /home/gusbemacbe/.config
XDG_CURRENT_DESKTOP
XDG_DATA_DIRS /home/gusbemacbe/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_DATA_HOME /home/gusbemacbe/.local/share
XDG_RUNTIME_DIR /run/user/1000
XDG_SEAT seat0
XDG_SEAT_PATH /org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS user
XDG_SESSION_DESKTOP
XDG_SESSION_ID 3
XDG_SESSION_PATH /org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE x11
XDG_USER_LOCAL /home/gusbemacbe/.local
XDG_VTNR 1
XINITRC /home/gusbemacbe/.xinitrc
XKB_DEFAULT_LAYOUT jp
XKB_DEFAULT_MODEL jp106
XKB_DEFAULT_OPTIONS grp:rctrl_toggle
XMODIFIERS @im=fcitx
_ENHANCD_FAILURE 60
_ENHANCD_SUCCESS 0
_ENHANCD_VERSION 2.2.4
color_scheme_path /usr/share/qt5ct/colors/i3wm-sgs.conf

@aeghn
Copy link

aeghn commented Jun 28, 2020

Sorry for the late reply.

Thanks for the information, but they are not so useful.

Anyway, try this first:

ulimit -s 8192
/usr/bin/fontpreview

@gusbemacbe
Copy link
Author

@aeghn

It is the same error

~/G/fontpreview    ulimit -s 8192                                                                                                   (7s 332ms)  
!~/G/fontpreview    LANG=en_GB.UTF-8 /usr/bin/fontpreview                                                                                 1 ┃
/usr/bin/fontpreview: line 11: /usr/bin/sort: Argument list too long
/usr/bin/fontpreview: line 11: /usr/bin/awk: Argument list too long
/usr/bin/fontpreview: line 69: /usr/bin/mkdir: Argument list too long
/usr/bin/fontpreview: line 71: /home/gusbemacbe/.cache/ftpr/text_preview: No such file or directory
/usr/bin/fontpreview: line 73: /home/gusbemacbe/.cache/ftpr/text_preview_history: No such file or directory
/usr/bin/fontpreview: line 100: /usr/bin/fzf: Argument list too long
/usr/bin/fontpreview: line 88: /usr/bin/rm: Argument list too long

@aeghn
Copy link

aeghn commented Jun 28, 2020

Try to increase the number in ulimit -s 8192

PS: I wonder how many fonts installed in your system?

@gusbemacbe
Copy link
Author

Try to increase the number in ulimit -s 8192

I did, and the same error.

PS: I wonder how many fonts installed in your system?

831 fonts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants