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

2

5

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?

Helwig answered 24/8, 2011 at 13:31 Comment(0)
K
3

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.

Kure answered 24/8, 2011 at 16:17 Comment(1)
That's Cool! And I have to said "HOW YOU KNOW THAT!" :DHelwig
S
5

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.

Skvorak answered 24/8, 2011 at 17:0 Comment(1)
You answer is also great! Thanks for the detail explanation.Helwig
K
3

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.

Kure answered 24/8, 2011 at 16:17 Comment(1)
That's Cool! And I have to said "HOW YOU KNOW THAT!" :DHelwig

© 2022 - 2024 — McMap. All rights reserved.