Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is "script name symbol" means for emacs set-fontset-font function?

When I read the documentation about set-fontset-font, I found there is a sentence like below:

(set-fontset-font NAME TARGET FONT-SPEC &optional FRAME ADD)

Modify fontset NAME to use FONT-SPEC for TARGET characters.
...
TARGET may be a script name symbol. In that case, use FONT-SPEC for all characters that belong to the script.
TARGET may be a charset. In that case, use FONT-SPEC for all characters in the charset.
...

But I cannot find any more information about what the "script name symbol" is?
I search via google to find some example that uses 'kan 'ascii 'kana. But I don't find any detail information about what it exactly is? Is there a way to list all the possible value?

BTW,
Is there a way to list all the possible value of "charset" that is available to set-fontset-font?

like image 765
winterTTr Avatar asked Aug 24 '11 13:08

winterTTr


People also ask

What does font mean in Emacs?

where FONT is a string naming the font you want, for example, "Droid Sans Mono-10". This should work on all platforms. As of Emacs 23, all of your system fonts including TrueType are available to Emacs.

How do I change the font size in Emacs 23?

GlobalTextScaleMode – Adjust font size for all buffers at once using face remapping (Emacs 23+). You can use any of the following to increase or decrease the font size for the current frame, effectively resizing it incrementally – zooming the text in or out. ‘zoom-in/out’, ‘zoom-in’, ‘zoom-out’ (in zoom-frm.el) – see above for the descriptions.

What does ‘ FontSet-default’ do?

Modifying ‘ fontset-default ’ will also affect other fontsets that use it as a fallback, so can be an effective way of fixing problems with the fonts that Emacs chooses for a particular script.

How do I use xfontsel in Emacs?

If you are running Linux, you may be able to run `xfontsel` from a shell. This program helps you select a font. Once you’ve found one that you like, save the specification string. In my version, clicking the “select” button near the top left copies the string to my clipboard so I can yank (paste) it into Emacs.


2 Answers

A "script name symbol" is a means to associate a lisp symbol with a particular charset, a set of charsets, or a range of characters. So, for example, if you look at the value of the variable "charset-script-alist", you will see an Alist of charsets vs the corresponding most appropriate script name symbols. If you look at the value of the variable "script-representative-chars", you will see an Alist of script name symbols vs the representative characters. The variable "char-script-table" shows the full mapping of characters to script name symbols (as specified by "script-representative-chars"). I don't know of any "definitive" list of script names (for example, "ascii" is a script name as well but isn't contained in these 2 variables); however, the values that are contained in the variables "charset-script-alist" and "char-script-table" are probably most of them.

To get a list of all the possible values of "charset" that is available to set-fontset-font, use the "list-character-sets" function. You can also use the "list-charset-chars" function to see the list of characters contained in a specific charset.

like image 51
zev Avatar answered Sep 22 '22 01:09

zev


M-:(char-table-extra-slot char-script-table 0) gives

'(latin phonetic greek coptic cyrillic armenian hebrew arabic
  syriac nko thaana devanagari bengali gurmukhi gujarati oriya
  tamil telugu kannada malayalam sinhala thai lao tibetan burmese
  georgian hangul ethiopic cherokee canadian-aboriginal ogham runic
  khmer mongolian symbol braille han ideographic-description
  cjk-misc kana bopomofo kanbun yi cham tai-viet linear-b
  aegean-number ancient-greek-number ancient-symbol phaistos-disc
  lycian carian olt-italic ugaritic old-persian deseret shavian
  osmanya cypriot-syllabary phoenician lydian kharoshthi cuneiform
  cuneiform-numbers-and-punctuation byzantine-musical-symbol
  musical-symbol ancient-greek-musical-notation
  tai-xuan-jing-symbol counting-rod-numeral mathematical
  mahjong-tile domino-tile)

For character sets, try M-xlist-character-sets.

like image 42
huaiyuan Avatar answered Sep 21 '22 01:09

huaiyuan