* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
@ 2021-11-09 6:44 tumashu
2021-11-09 7:08 ` Lars Ingebrigtsen
2021-11-12 6:35 ` Lars Ingebrigtsen
0 siblings, 2 replies; 14+ messages in thread
From: tumashu @ 2021-11-09 6:44 UTC (permalink / raw
To: 51704
The below code does not work.
;; This is a test
;; 这是一个测试
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font
t
charset
(font-spec :name "Microsoft Yahei"
:weight 'normal
:slant 'normal
:size 20)))
when I remove :weight 'normal, it works again, I have tested, it relate
to commit:
commit 65fd3ca84f75aee0dfebb87fa793dae57c1caf35
Author: Lars Ingebrigtsen <larsi@gnus.org>
AuthorDate: Thu Oct 21 04:30:02 2021 +0200
Support the "medium" font weight
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
of 2021-11-09 built on debian
Repository revision: 97fa2ffdf7cb14b59a8aa891e187cd5210fd418b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure --prefix=/home/feng/emacs/emacs29-gtk-20211109
--with-native-compilation --with-xwidgets --with-json'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB
Important settings:
value of $LANG: zh_CN.UTF-8
value of $XMODIFIERS: @im=fcitx
locale-coding-system: utf-8-unix
Major mode: ELisp/d
Minor modes in effect:
global-undo-tree-mode: t
undo-tree-mode: t
projectile-mode: t
global-git-commit-mode: t
magit-auto-revert-mode: t
aggressive-indent-mode: t
emms-playing-time-display-mode: t
emms-playing-time-mode: t
yas-global-mode: t
yas-minor-mode: t
company-posframe-mode: t
global-company-mode: t
company-mode: t
org-super-agenda-mode: t
shell-dirtrack-mode: t
pyim-isearch-mode: t
vertico-mode: t
savehist-mode: t
global-so-long-mode: t
electric-pair-mode: t
recentf-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tab-bar-history-mode: t
tab-bar-mode: t
file-name-shadow-mode: t
context-menu-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
/home/feng/.emacs.d/elpa-29/transient-20211105.100/transient hides /home/feng/emacs/emacs29-gtk-20211109/share/emacs/29.0.50/lisp/transient
Features:
(shadow mule-util mail-extr emacsbug sendmail cursor-sensor
eh-gnus-common gnus-select-account eww xdg url-queue mm-url gnus-demon
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cite gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-cache
gnus-sum shr kinsoku svg dom gnus-group gnus-undo gnus-start gnus-dbus
dbus gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo gnus-spec
gnus-int gnus-range gnus-win gnus nnheader wjw eh-gnus emacs-helper
eh-misc undo-tree projectile lisp-mnt grep ibuf-ext ibuffer
ibuffer-loaddefs magit-bookmark magit-submodule magit-obsolete
magit-popup magit-blame magit-stash magit-reflog magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-files magit-refs magit-status magit
magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff
smerge-mode diff diff-mode git-commit log-edit message yank-media rmc
puny rfc822 mml mml-sec epa derived gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor server magit-mode transient
edmacro magit-git magit-section magit-utils crm gitpatch
aggressive-indent eh-emms emms-librefm-stream xml emms-librefm-scrobbler
emms-playlist-limit emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon
emms-player-xine emms-player-mpd tq emms-lyrics emms-url emms-streams
emms-show-all emms-tag-editor emms-tag-tracktag emms-mark emms-mode-line
emms-info-tinytag emms-info-metaflac emms-info-opusinfo
emms-info-ogginfo emms-info-mp3info emms-player-vlc emms-player-mpv
emms-playing-time emms-player-mplayer emms-player-simple emms-browser
sort emms-playlist-sort emms-last-played emms-volume
emms-volume-sndioctl emms-volume-mixerctl emms-volume-pulse
emms-volume-amixer emms-playlist-mode emms-source-playlist
emms-source-file locate emms-cache emms-info-native bindat
emms-info-exiftool emms-info emms-later-do emms-setup emms emms-compat
epg rfc6068 epg-config el2org cnfonts cnfonts-ui cus-edit cus-load
thingatpt yasnippet vterm face-remap compile color term disp-table ehelp
vterm-module term/xterm xterm citre-config citre-lang-fileref citre-util
citre-core citre-tag citre-core-tables citre-common eh-complete
company-posframe company-keywords company-etags etags fileloop xref
project company-gtags company-template company-dabbrev-code
company-dabbrev company-files company-capf company eh-org
org-super-agenda ts ht s org-habit ob-python python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat shell
parse-time ls-lisp ob-org ob-plantuml ox-extra ox-md ox-org ox-odt
rng-loc rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse
nxml-ns nxml-enc xmltok nxml-util ox-latex ox-icalendar org-agenda
ox-html table ox-ascii ox-publish ox org-element avl-tree generator
org-protocol autorevert filenotify pcase org-attach org-id org-refile
org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete pcomplete comint ansi-color org-list
org-faces org-entities noutline outline easy-mmode org-version
ob-emacs-lisp ob-core ob-eval org-table oc-basic bibtex iso8601
time-date org-keys oc org-loaddefs find-func eh-functions eh-theme
modus-vivendi-theme modus-operandi-theme modus-themes eh-basic
cal-china-x cal-china lunar solar cal-dst holidays hol-loaddefs cal-menu
calendar cal-loaddefs pyim-liberime liberime liberime-core pyim
pyim-hacks pyim-probe pyim-cregexp xr pyim-process pyim-cstring
pyim-autoselector pyim-punctuation pyim-outcome pyim-indicator
pyim-preview pyim-magic pyim-candidates pyim-codes pyim-imobjs
pyim-pinyin pyim-pymap pyim-entered pyim-dcache pyim-dict pyim-page
popup posframe pyim-scheme pyim-common dired-ranger ring
dired-hacks-utils dash wdired dired dired-loaddefs vc vc-dispatcher
consult-vertico consult kmacro orderless vertico savehist switch-window
switch-window-mvborder switch-window-asciiart quail so-long elec-pair
bookmark text-property-search pp recentf tree-widget wid-edit
elpa-mirror finder-inf ol org-compat advice org-macs format-spec comp
comp-cstr warnings rx cl-extra help-mode info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json map url-vars
seq gv subr-x byte-opt bytecomp byte-compile cconv cl-loaddefs cl-lib
china-util iso-transl tooltip eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads xwidget-internal dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process
native-compile emacs)
Memory information:
((conses 16 684448 34339)
(symbols 48 45352 4)
(strings 32 184598 9834)
(string-bytes 1 5906358)
(vectors 16 83670)
(vector-slots 8 2187269 73075)
(floats 8 1184 31)
(intervals 56 777 41)
(buffers 992 11))
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 6:44 bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec tumashu
@ 2021-11-09 7:08 ` Lars Ingebrigtsen
2021-11-09 7:29 ` bug#51704: " tumashu
2021-11-12 6:35 ` Lars Ingebrigtsen
1 sibling, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-09 7:08 UTC (permalink / raw
To: tumashu; +Cc: 51704
tumashu <tumashu@163.com> writes:
> ;; This is a test
> ;; 这是一个测试
> (dolist (charset '(kana han symbol cjk-misc bopomofo))
> (set-fontset-font
> t
> charset
> (font-spec :name "Microsoft Yahei"
> :weight 'normal
> :slant 'normal
> :size 20)))
Does `medium' work instead?
Previously, Emacs put `normal' at a 100 weight as a synonym with
`medium', and that was not according to spec. `normal' is now at 80,
and `medium' is at 100.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: Re: bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 7:08 ` Lars Ingebrigtsen
@ 2021-11-09 7:29 ` tumashu
2021-11-09 7:33 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: tumashu @ 2021-11-09 7:29 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 51704
At 2021-11-09 15:08:22, "Lars Ingebrigtsen" <larsi@gnus.org> wrote:
>tumashu <tumashu@163.com> writes:
>
>> ;; This is a test
>> ;; 这是一个测试
>> (dolist (charset '(kana han symbol cjk-misc bopomofo))
>> (set-fontset-font
>> t
>> charset
>> (font-spec :name "Microsoft Yahei"
>> :weight 'normal
>> :slant 'normal
>> :size 20)))
>
>Does `medium' work instead?
>
>Previously, Emacs put `normal' at a 100 weight as a synonym with
>`medium', and that was not according to spec. `normal' is now at 80,
>and `medium' is at 100.
medium work.
Does old emacs support 'medium?
>
>--
>(domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 7:29 ` bug#51704: " tumashu
@ 2021-11-09 7:33 ` Lars Ingebrigtsen
2021-11-09 7:45 ` tumashu
2021-11-09 12:57 ` Eli Zaretskii
0 siblings, 2 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-09 7:33 UTC (permalink / raw
To: tumashu; +Cc: 51704
tumashu <tumashu@163.com> writes:
> medium work.
>
> Does old emacs support 'medium?
Yes, in older Emacsen, `medium' is an alias for `normal'. This was
split up since the font spec allows two different font weights here (and
`medium' is heavier than `normal'), and Emacs didn't have a way to
choose the actual `normal' font.
The problem is that if you have a font that doesn't have the now-lighter
`normal' font, Emacs won't find the right spec. I'm not sure whether
there's any way to make a fallback of some kind here work... I'm
amending the text in etc/NEWS and moving it to the "incompatible"
section, though.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 7:33 ` Lars Ingebrigtsen
@ 2021-11-09 7:45 ` tumashu
2021-11-09 12:57 ` Eli Zaretskii
1 sibling, 0 replies; 14+ messages in thread
From: tumashu @ 2021-11-09 7:45 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 51704@debbugs.gnu.org
At 2021-11-09 15:33:04, "Lars Ingebrigtsen" <larsi@gnus.org> wrote:
>tumashu <tumashu@163.com> writes:
>
>> medium work.
>>
>> Does old emacs support 'medium?
>
>Yes, in older Emacsen, `medium' is an alias for `normal'. This was
>split up since the font spec allows two different font weights here (and
>`medium' is heavier than `normal'), and Emacs didn't have a way to
>choose the actual `normal' font.
>
>The problem is that if you have a font that doesn't have the now-lighter
>`normal' font, Emacs won't find the right spec. I'm not sure whether
>there's any way to make a fallback of some kind here work... I'm
>amending the text in etc/NEWS and moving it to the "incompatible"
>section, though.
I see, I will switch to use 'medium in my code.
>
>--
>(domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 7:33 ` Lars Ingebrigtsen
2021-11-09 7:45 ` tumashu
@ 2021-11-09 12:57 ` Eli Zaretskii
2021-11-09 23:45 ` Lars Ingebrigtsen
1 sibling, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2021-11-09 12:57 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: tumashu, 51704
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 09 Nov 2021 08:33:04 +0100
> Cc: 51704@debbugs.gnu.org
>
> tumashu <tumashu@163.com> writes:
>
> > medium work.
> >
> > Does old emacs support 'medium?
>
> Yes, in older Emacsen, `medium' is an alias for `normal'. This was
> split up since the font spec allows two different font weights here (and
> `medium' is heavier than `normal'), and Emacs didn't have a way to
> choose the actual `normal' font.
>
> The problem is that if you have a font that doesn't have the now-lighter
> `normal' font, Emacs won't find the right spec. I'm not sure whether
> there's any way to make a fallback of some kind here work... I'm
> amending the text in etc/NEWS and moving it to the "incompatible"
> section, though.
Can we rethink this incompatible change? Isn't there a way of
achieving the same goal without breaking people's font customizations?
Why was there a need to make 'normal' and 'medium' be different?
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 12:57 ` Eli Zaretskii
@ 2021-11-09 23:45 ` Lars Ingebrigtsen
2021-11-10 18:22 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-09 23:45 UTC (permalink / raw
To: Eli Zaretskii; +Cc: tumashu, 51704
Eli Zaretskii <eliz@gnu.org> writes:
> Can we rethink this incompatible change? Isn't there a way of
> achieving the same goal without breaking people's font customizations?
> Why was there a need to make 'normal' and 'medium' be different?
Because (some) fonts define both a `normal' and `medium' weight, and
they are different weights. Previously Emacs couldn't use both.
The basic problem is in the font selection mechanism we choose -- if
we're asking for `normal' (weight 80) and the font doesn't have a weight
in the area of 78-82 (I think it was; it's been a couple of weeks since
I looked at this), it'll just give up and say "I can't find the font"
instead of choosing the closest weight the font does have. Which would
improve the situation significantly for users.
I briefly tried to find where this selection actually happens in the
font machinery (i.e., whether there's a way to change the range of
acceptable weights), but I didn't find it. Do you happen to know where
it happens? If not, I can start trying to debug this again.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 23:45 ` Lars Ingebrigtsen
@ 2021-11-10 18:22 ` Eli Zaretskii
2021-11-10 22:45 ` tumashu
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2021-11-10 18:22 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: tumashu, 51704
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: tumashu@163.com, 51704@debbugs.gnu.org
> Date: Wed, 10 Nov 2021 00:45:16 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Can we rethink this incompatible change? Isn't there a way of
> > achieving the same goal without breaking people's font customizations?
> > Why was there a need to make 'normal' and 'medium' be different?
>
> Because (some) fonts define both a `normal' and `medium' weight, and
> they are different weights. Previously Emacs couldn't use both.
>
> The basic problem is in the font selection mechanism we choose -- if
> we're asking for `normal' (weight 80) and the font doesn't have a weight
> in the area of 78-82 (I think it was; it's been a couple of weeks since
> I looked at this), it'll just give up and say "I can't find the font"
> instead of choosing the closest weight the font does have. Which would
> improve the situation significantly for users.
But the problem I saw was that w32font.c didn't have both medium and
normal, it had only one of them. So I now readjusted the conversion
between Fontconfig values and MS-Windows values in a way that supports
both normal and medium. Feng, could you please try the latest master
branch, with your original fontset customizations, and see if there is
any change (hopefully, for the better)?
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-10 18:22 ` Eli Zaretskii
@ 2021-11-10 22:45 ` tumashu
0 siblings, 0 replies; 14+ messages in thread
From: tumashu @ 2021-11-10 22:45 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, 51704
[-- Attachment #1: Type: text/plain, Size: 1802 bytes --]
--
发自我的网易邮箱手机智能版
<br/><br/><br/>
----- Original Message -----
From: "Eli Zaretskii" <eliz@gnu.org>
To: "Lars Ingebrigtsen" <larsi@gnus.org>
Cc: tumashu@163.com, 51704@debbugs.gnu.org
Sent: Wed, 10 Nov 2021 20:22:00 +0200
Subject: bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: tumashu@163.com, 51704@debbugs.gnu.org
> Date: Wed, 10 Nov 2021 00:45:16 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Can we rethink this incompatible change? Isn't there a way of
> > achieving the same goal without breaking people's font customizations?
> > Why was there a need to make 'normal' and 'medium' be different?
>
> Because (some) fonts define both a `normal' and `medium' weight, and
> they are different weights. Previously Emacs couldn't use both.
>
> The basic problem is in the font selection mechanism we choose -- if
> we're asking for `normal' (weight 80) and the font doesn't have a weight
> in the area of 78-82 (I think it was; it's been a couple of weeks since
> I looked at this), it'll just give up and say "I can't find the font"
> instead of choosing the closest weight the font does have. Which would
> improve the situation significantly for users.
But the problem I saw was that w32font.c didn't have both medium and
normal, it had only one of them. So I now readjusted the conversion
between Fontconfig values and MS-Windows values in a way that supports
both normal and medium. Feng, could you please try the latest master
branch, with your original fontset customizations, and see if there is
any change (hopefully, for the better)?
sorry, i use debian linux, just copy YaHei fonts to test.
maybe many Chinese font only have one of them, i do not know.
[-- Attachment #2: Type: text/html, Size: 3392 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-09 6:44 bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec tumashu
2021-11-09 7:08 ` Lars Ingebrigtsen
@ 2021-11-12 6:35 ` Lars Ingebrigtsen
2021-11-12 8:21 ` tumashu
1 sibling, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-12 6:35 UTC (permalink / raw
To: tumashu; +Cc: 51704
tumashu <tumashu@163.com> writes:
> The below code does not work.
>
> ;; This is a test
> ;; 这是一个测试
> (dolist (charset '(kana han symbol cjk-misc bopomofo))
> (set-fontset-font
> t
> charset
> (font-spec :name "Microsoft Yahei"
> :weight 'normal
> :slant 'normal
> :size 20)))
>
> when I remove :weight 'normal, it works again, I have tested, it relate
> to commit:
I've now fixed up another bug in this area -- could you build Emacs
again (from master) and check whether it fixes this issue, too? (I'd
say it's a 50/50 chance. 😀)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-12 6:35 ` Lars Ingebrigtsen
@ 2021-11-12 8:21 ` tumashu
2021-11-12 8:23 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: tumashu @ 2021-11-12 8:21 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 51704@debbugs.gnu.org
在 2021-11-12 14:35:08,"Lars Ingebrigtsen" <larsi@gnus.org> 写道:
>tumashu <tumashu@163.com> writes:
>
>> The below code does not work.
>>
>> ;; This is a test
>> ;; 这是一个测试
>> (dolist (charset '(kana han symbol cjk-misc bopomofo))
>> (set-fontset-font
>> t
>> charset
>> (font-spec :name "Microsoft Yahei"
>> :weight 'normal
>> :slant 'normal
>> :size 20)))
>>
>> when I remove :weight 'normal, it works again, I have tested, it relate
>> to commit:
>
>I've now fixed up another bug in this area -- could you build Emacs
>again (from master) and check whether it fixes this issue, too? (I'd
>say it's a 50/50 chance. )
In my opinion, I do not care regular or Medium, and I just want to one of them,
maybe Regular is more common than medium
fc-list |grep Regular| wc -l
333
fc-list |grep Medium| wc -l
9
By the way, Regular mean 'normal in emacs ?
>
>--
>(domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-12 8:21 ` tumashu
@ 2021-11-12 8:23 ` Lars Ingebrigtsen
2021-11-12 8:33 ` tumashu
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-12 8:23 UTC (permalink / raw
To: tumashu; +Cc: 51704@debbugs.gnu.org
tumashu <tumashu@163.com> writes:
>>I've now fixed up another bug in this area -- could you build Emacs
>>again (from master) and check whether it fixes this issue, too? (I'd
>>say it's a 50/50 chance. )
>
> In my opinion, I do not care regular or Medium, and I just want to one of them,
> maybe Regular is more common than medium
But did the change fix the problem you were seeing?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-12 8:23 ` Lars Ingebrigtsen
@ 2021-11-12 8:33 ` tumashu
2021-11-12 8:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: tumashu @ 2021-11-12 8:33 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 51704@debbugs.gnu.org
At 2021-11-12 16:23:50, "Lars Ingebrigtsen" <larsi@gnus.org> wrote:
>tumashu <tumashu@163.com> writes:
>
>>>I've now fixed up another bug in this area -- could you build Emacs
>>>again (from master) and check whether it fixes this issue, too? (I'd
>>>say it's a 50/50 chance. )
>>
>> In my opinion, I do not care regular or Medium, and I just want to one of them,
>> maybe Regular is more common than medium
>
>But did the change fix the problem you were seeing?
yes
Maybe the real reason I use :weight 'normal or :weight :media is that
without two, the below code sometimes will select bold weight, I do not know why.
(progn
(set-face-attribute
'default nil
:font (font-spec :name "PragmataPro"
:size 14.0))
(dolist (charset '(kana han symbol cjk-misc bopomofo))
(set-fontset-font
t
charset
(font-spec :name "黑体"
:size 14.0))))
>
>--
>(domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec
2021-11-12 8:33 ` tumashu
@ 2021-11-12 8:46 ` Lars Ingebrigtsen
0 siblings, 0 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2021-11-12 8:46 UTC (permalink / raw
To: tumashu; +Cc: 51704@debbugs.gnu.org
tumashu <tumashu@163.com> writes:
>>But did the change fix the problem you were seeing?
>
> yes
Great; I'm closing this bug report, then.
> Maybe the real reason I use :weight 'normal or :weight :media is that
> without two, the below code sometimes will select bold weight, I do not know why.
Emacs usually chooses a pretty normal-weighted font for me -- do you see
this with other fonts than those?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2021-11-12 8:46 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-09 6:44 bug#51704: 29.0.50; set-fontset-font do not work well with :weight 'normal of font-spec tumashu
2021-11-09 7:08 ` Lars Ingebrigtsen
2021-11-09 7:29 ` bug#51704: " tumashu
2021-11-09 7:33 ` Lars Ingebrigtsen
2021-11-09 7:45 ` tumashu
2021-11-09 12:57 ` Eli Zaretskii
2021-11-09 23:45 ` Lars Ingebrigtsen
2021-11-10 18:22 ` Eli Zaretskii
2021-11-10 22:45 ` tumashu
2021-11-12 6:35 ` Lars Ingebrigtsen
2021-11-12 8:21 ` tumashu
2021-11-12 8:23 ` Lars Ingebrigtsen
2021-11-12 8:33 ` tumashu
2021-11-12 8:46 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).