all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Browsing Unicode Symbols
@ 2008-07-08 12:58 Nordlöw
  2008-07-08 15:37 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nordlöw @ 2008-07-08 12:58 UTC (permalink / raw)
  To: help-gnu-emacs

Is there a way to visually browse/explore the Unicode symbols
available in GNU Emacs (CVS) either globally or locally defined by a
specific/current font? Compare list-colors-display().

Thanks in advance,
Nordlöw


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
  2008-07-08 12:58 Browsing Unicode Symbols Nordlöw
@ 2008-07-08 15:37 ` Peter Dyballa
       [not found] ` <mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org>
  2008-07-09  7:43 ` Xah
  2 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2008-07-08 15:37 UTC (permalink / raw)
  To: Nordlöw; +Cc: help-gnu-emacs


Am 08.07.2008 um 14:58 schrieb Nordlöw:

> Is there a way to visually browse/explore the Unicode symbols
> available in GNU Emacs (CVS) either globally or locally defined by a
> specific/current font? Compare list-colors-display().


Yes. Open utf8.txt from the Kermit distribution. When you're using  
only fonts (as opposed to fontsets) then you'll see, what this font  
can offer for you.

--
Greetings

   Pete

The mathematician who pursues his studies without clear views of this  
matter, must often have the uncomfortable feeling that his paper and  
pencil surpass him in intelligence.
				– Ernst Mach







^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
       [not found] ` <mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org>
@ 2008-07-08 22:52   ` Florian Beck
  2008-07-09  8:08     ` Peter Dyballa
       [not found]     ` <mailman.14434.1215590915.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Florian Beck @ 2008-07-08 22:52 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

> Am 08.07.2008 um 14:58 schrieb Nordlöw:
>
>> Is there a way to visually browse/explore the Unicode symbols
>> available in GNU Emacs (CVS) either globally or locally defined by a
>> specific/current font? Compare list-colors-display().
>
> Yes. Open utf8.txt from the Kermit distribution. When you're using
> only fonts (as opposed to fontsets) then you'll see, what this font
> can offer for you.

How exactly do I do this: »using only fonts (as opposed to fontsets)«?
As far as I can see I am always using a fontset.

Anyway, to see how a certain character is displayed, simply insert it:

(insert (propertize STRING 'face `(:family ,(format "%s" FONT))))

To visualise how a certain character is displayed by all your fonts, you
can use something like this:

(defun insert-char-all-fonts (char &optional collection start end)
  "Insert CHAR with all fonts in COLLECTION."
  (let ((collection (delete-dups (or collection (mapcar #' (lambda (font) (aref font 0)) (x-family-fonts)))))
	(i 0))
    (dolist (font collection)
      (if (and (or (not start) (>= i start))
	       (or (not end) (<= i end)))
      (insert ;(get-char-with-font char font)
	        (propertize char 'face `(:family ,(format "%s" font)))))
      (incf i))))

You have to turn off font-lock to see the effect.

Caveat: this gets *very* slow if you have a lot of fonts (use start and
end).

To see how a specific font renders all characters, dolist the characters
defined in the the unicode standard (/admin/unidata/UnicodeData.txt in
the emacs sources).
     

-- 
Florian Beck


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
  2008-07-08 12:58 Browsing Unicode Symbols Nordlöw
  2008-07-08 15:37 ` Peter Dyballa
       [not found] ` <mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org>
@ 2008-07-09  7:43 ` Xah
  2 siblings, 0 replies; 7+ messages in thread
From: Xah @ 2008-07-09  7:43 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 8, 5:58 am, Nordlöw <per.nord...@gmail.com> wrote:
> Is there a way to visually browse/explore the Unicode symbols
> available in GNU Emacs (CVS) either globally or locally defined by a
> specific/current font? Compare list-colors-display().

I'm not aware of one... (not that i would know...)

However, you could easly create your own by several means. Here's few
possibilities.

• Just create a file and insert unicode you use often. Then, you can
easily define a command and bind it to f6, so pressing a buttons shows
it.

For some symbols i use, i have

http://xahlee.org/emacs/unicode.txt
http://xahlee.org/Periodic_dosage_dir/t1/20040505_unicode.html

; open my unicode template with F8 key
(global-set-key (kbd "<f8>")
  (lambda () (interactive) (find-file "~/my_unicode_template.txt")))

• here's a code that insert unicode chars 32 to 128

(let ((x 32))
  (while (/= x 128)
    (ucs-insert x)
    (setq x (+ x 1))))

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
  2008-07-08 22:52   ` Florian Beck
@ 2008-07-09  8:08     ` Peter Dyballa
       [not found]     ` <mailman.14434.1215590915.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2008-07-09  8:08 UTC (permalink / raw)
  To: Florian Beck; +Cc: help-gnu-emacs


Am 09.07.2008 um 00:52 schrieb Florian Beck:

> Peter Dyballa <Peter_Dyballa> writes:
>
>> Am 08.07.2008 um 14:58 schrieb Nordlöw:
>>
>>> Is there a way to visually browse/explore the Unicode symbols
>>> available in GNU Emacs (CVS) either globally or locally defined by a
>>> specific/current font? Compare list-colors-display().
>>
>> Yes. Open utf8.txt from the Kermit distribution. When you're using
>> only fonts (as opposed to fontsets) then you'll see, what this font
>> can offer for you.
>
> How exactly do I do this: »using only fonts (as opposed to fontsets)«?
> As far as I can see I am always using a fontset.

I don't know for sure. Maybe it works to select a certain font from  
the fonts menu (S-mouse-1).

> To see how a specific font renders all characters, dolist the  
> characters
> defined in the the unicode standard (/admin/unidata/UnicodeData.txt in
> the emacs sources).


How do *you* see these? The file is just a description of Unicode  
characters in US-ASCII ... The same is true for the file unidata.txt  
in the same directory. Both files can be helpful when customising  
what to show on a C-u C-x = on some character.

--
Mit friedvollen Grüßen

   Pete

Who the fsck is "General Failure," and why is he reading my disk?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
       [not found]     ` <mailman.14434.1215590915.18990.help-gnu-emacs@gnu.org>
@ 2008-07-09 14:32       ` Florian Beck
  2008-07-10 11:04         ` Peter Dyballa
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Beck @ 2008-07-09 14:32 UTC (permalink / raw)
  To: help-gnu-emacs

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

>> To see how a specific font renders all characters, dolist the
>> characters
>> defined in the the unicode standard (/admin/unidata/UnicodeData.txt in
>> the emacs sources).
>
> How do *you* see these? The file is just a description of Unicode
> characters in US-ASCII

Well, yes, but you can use it to get the data you need.

I do it with this function:

(defun test-unicode (&optional font)
  (interactive)
  (let (unidata)
    (with-temp-buffer
      (insert-file-contents "/home/fb/src/emacs/admin/unidata/UnicodeData.txt")
      (goto-char (point-min))
      (while (re-search-forward "^\\([[:alnum:]]+\\);\\(.*?\\);" nil t)
	(let* ((code (string-to-number (match-string 1) 16))
	       (char (char-to-string code)))
          ;; Symbols the specified font cannot handle may still be
          ;; displayed in another font.
	  (if font (setq char (propertize char 'face `(:family ,(format "%s" font)))))
	  (add-to-list 'unidata
		       (cons code
			     (concat (format "%6x" code) "\t" char "\t" (downcase (match-string 2))))))))
    (setq unidata (reverse unidata))
    (switch-to-buffer "*Unicode Test*")
    (erase-buffer)
    (let (done-blocks)
      (dolist (entry unidata)
	;; group by range
	(let ((ublock (unicode-block (car entry))))
	  (unless (member ublock done-blocks)
	    (add-to-list 'done-blocks ublock)
	    (insert "\n\n" ublock "\n")))
	(insert (cdr entry) "\n")))))

Either comment out the let block that groups by range or use the
following (I have not looked into how describe-char handles this):

(defun unicode-block (char)
  (let ((list unicode-blocks)
	block-name)
    (dolist (i list)
      (if (and (>= char (car i))
	       (<= char (cadr i)))
	  (setq block-name (nth 2 i))))
    block-name))

(defvar unicode-blocks
  '((?\x0000 ?\x007F "Basic Latin")
    (?\x0080 ?\x00FF "Latin-1 Supplement")
    (?\x0100 ?\x017F "Latin Extended-A")
    (?\x0180 ?\x024F "Latin Extended-B")
    (?\x0250 ?\x02AF "IPA Extensions")
    (?\x02B0 ?\x02FF "Spacing Modifier Letters")
    (?\x0300 ?\x036F "Combining Diacritical Marks")
    (?\x0370 ?\x03FF "Greek and Coptic")
    (?\x0400 ?\x04FF "Cyrillic")
    (?\x0500 ?\x052F "Cyrillic Supplement")
    (?\x0530 ?\x058F "Armenian")
    (?\x0590 ?\x05FF "Hebrew")
    (?\x0600 ?\x06FF "Arabic")
    (?\x0700 ?\x074F "Syriac")
    (?\x0750 ?\x077F "Arabic Supplement")
    (?\x0780 ?\x07BF "Thaana")
    (?\x07C0 ?\x07FF "NKo")
    (?\x0900 ?\x097F "Devanagari")
    (?\x0980 ?\x09FF "Bengali")
    (?\x0A00 ?\x0A7F "Gurmukhi")
    (?\x0A80 ?\x0AFF "Gujarati")
    (?\x0B00 ?\x0B7F "Oriya")
    (?\x0B80 ?\x0BFF "Tamil")
    (?\x0C00 ?\x0C7F "Telugu")
    (?\x0C80 ?\x0CFF "Kannada")
    (?\x0D00 ?\x0D7F "Malayalam")
    (?\x0D80 ?\x0DFF "Sinhala")
    (?\x0E00 ?\x0E7F "Thai")
    (?\x0E80 ?\x0EFF "Lao")
    (?\x0F00 ?\x0FFF "Tibetan")
    (?\x1000 ?\x109F "Myanmar")
    (?\x10A0 ?\x10FF "Georgian")
    (?\x1100 ?\x11FF "Hangul Jamo")
    (?\x1200 ?\x137F "Ethiopic")
    (?\x1380 ?\x139F "Ethiopic Supplement")
    (?\x13A0 ?\x13FF "Cherokee")
    (?\x1400 ?\x167F "Unified Canadian Aboriginal Syllabics")
    (?\x1680 ?\x169F "Ogham")
    (?\x16A0 ?\x16FF "Runic")
    (?\x1700 ?\x171F "Tagalog")
    (?\x1720 ?\x173F "Hanunoo")
    (?\x1740 ?\x175F "Buhid")
    (?\x1760 ?\x177F "Tagbanwa")
    (?\x1780 ?\x17FF "Khmer")
    (?\x1800 ?\x18AF "Mongolian")
    (?\x1900 ?\x194F "Limbu")
    (?\x1950 ?\x197F "Tai Le")
    (?\x1980 ?\x19DF "New Tai Lue")
    (?\x19E0 ?\x19FF "Khmer Symbols")
    (?\x1A00 ?\x1A1F "Buginese")
    (?\x1B00 ?\x1B7F "Balinese")
    (?\x1B80 ?\x1BBF "Sundanese")
    (?\x1C00 ?\x1C4F "Lepcha")
    (?\x1C50 ?\x1C7F "Ol Chiki")
    (?\x1D00 ?\x1D7F "Phonetic Extensions")
    (?\x1D80 ?\x1DBF "Phonetic Extensions Supplement")
    (?\x1DC0 ?\x1DFF "Combining Diacritical Marks Supplement")
    (?\x1E00 ?\x1EFF "Latin Extended Additional")
    (?\x1F00 ?\x1FFF "Greek Extended")
    (?\x2000 ?\x206F "General Punctuation")
    (?\x2070 ?\x209F "Superscripts and Subscripts")
    (?\x20A0 ?\x20CF "Currency Symbols")
    (?\x20D0 ?\x20FF "Combining Diacritical Marks for Symbols")
    (?\x2100 ?\x214F "Letterlike Symbols")
    (?\x2150 ?\x218F "Number Forms")
    (?\x2190 ?\x21FF "Arrows")
    (?\x2200 ?\x22FF "Mathematical Operators")
    (?\x2300 ?\x23FF "Miscellaneous Technical")
    (?\x2400 ?\x243F "Control Pictures")
    (?\x2440 ?\x245F "Optical Character Recognition")
    (?\x2460 ?\x24FF "Enclosed Alphanumerics")
    (?\x2500 ?\x257F "Box Drawing")
    (?\x2580 ?\x259F "Block Elements")
    (?\x25A0 ?\x25FF "Geometric Shapes")
    (?\x2600 ?\x26FF "Miscellaneous Symbols")
    (?\x2700 ?\x27BF "Dingbats")
    (?\x27C0 ?\x27EF "Miscellaneous Mathematical Symbols-A")
    (?\x27F0 ?\x27FF "Supplemental Arrows-A")
    (?\x2800 ?\x28FF "Braille Patterns")
    (?\x2900 ?\x297F "Supplemental Arrows-B")
    (?\x2980 ?\x29FF "Miscellaneous Mathematical Symbols-B")
    (?\x2A00 ?\x2AFF "Supplemental Mathematical Operators")
    (?\x2B00 ?\x2BFF "Miscellaneous Symbols and Arrows")
    (?\x2C00 ?\x2C5F "Glagolitic")
    (?\x2C60 ?\x2C7F "Latin Extended-C")
    (?\x2C80 ?\x2CFF "Coptic")
    (?\x2D00 ?\x2D2F "Georgian Supplement")
    (?\x2D30 ?\x2D7F "Tifinagh")
    (?\x2D80 ?\x2DDF "Ethiopic Extended")
    (?\x2DE0 ?\x2DFF "Cyrillic Extended-A")
    (?\x2E00 ?\x2E7F "Supplemental Punctuation")
    (?\x2E80 ?\x2EFF "CJK Radicals Supplement")
    (?\x2F00 ?\x2FDF "Kangxi Radicals")
    (?\x2FF0 ?\x2FFF "Ideographic Description Characters")
    (?\x3000 ?\x303F "CJK Symbols and Punctuation")
    (?\x3040 ?\x309F "Hiragana")
    (?\x30A0 ?\x30FF "Katakana")
    (?\x3100 ?\x312F "Bopomofo")
    (?\x3130 ?\x318F "Hangul Compatibility Jamo")
    (?\x3190 ?\x319F "Kanbun")
    (?\x31A0 ?\x31BF "Bopomofo Extended")
    (?\x31C0 ?\x31EF "CJK Strokes")
    (?\x31F0 ?\x31FF "Katakana Phonetic Extensions")
    (?\x3200 ?\x32FF "Enclosed CJK Letters and Months")
    (?\x3300 ?\x33FF "CJK Compatibility")
    (?\x3400 ?\x4DBF "CJK Unified Ideographs Extension A")
    (?\x4DC0 ?\x4DFF "Yijing Hexagram Symbols")
    (?\x4E00 ?\x9FFF "CJK Unified Ideographs")
    (?\xA000 ?\xA48F "Yi Syllables")
    (?\xA490 ?\xA4CF "Yi Radicals")
    (?\xA500 ?\xA63F "Vai")
    (?\xA640 ?\xA69F "Cyrillic Extended-B")
    (?\xA700 ?\xA71F "Modifier Tone Letters")
    (?\xA720 ?\xA7FF "Latin Extended-D")
    (?\xA800 ?\xA82F "Syloti Nagri")
    (?\xA840 ?\xA87F "Phags-pa")
    (?\xA880 ?\xA8DF "Saurashtra")
    (?\xA900 ?\xA92F "Kayah Li")
    (?\xA930 ?\xA95F "Rejang")
    (?\xAA00 ?\xAA5F "Cham")
    (?\xAC00 ?\xD7AF "Hangul Syllables")
    (?\xD800 ?\xDB7F "High Surrogates")
    (?\xDB80 ?\xDBFF "High Private Use Surrogates")
    (?\xDC00 ?\xDFFF "Low Surrogates")
    (?\xE000 ?\xF8FF "Private Use Area")
    (?\xF900 ?\xFAFF "CJK Compatibility Ideographs")
    (?\xFB00 ?\xFB4F "Alphabetic Presentation Forms")
    (?\xFB50 ?\xFDFF "Arabic Presentation Forms-A")
    (?\xFE00 ?\xFE0F "Variation Selectors")
    (?\xFE10 ?\xFE1F "Vertical Forms")
    (?\xFE20 ?\xFE2F "Combining Half Marks")
    (?\xFE30 ?\xFE4F "CJK Compatibility Forms")
    (?\xFE50 ?\xFE6F "Small Form Variants")
    (?\xFE70 ?\xFEFF "Arabic Presentation Forms-B")
    (?\xFF00 ?\xFFEF "Halfwidth and Fullwidth Forms")
    (?\xFFF0 ?\xFFFF "Specials")
    (?\x10000 ?\x1007F "Linear B Syllabary")
    (?\x10080 ?\x100FF "Linear B Ideograms")
    (?\x10100 ?\x1013F "Aegean Numbers")
    (?\x10140 ?\x1018F "Ancient Greek Numbers")
    (?\x10190 ?\x101CF "Ancient Symbols")
    (?\x101D0 ?\x101FF "Phaistos Disc")
    (?\x10280 ?\x1029F "Lycian")
    (?\x102A0 ?\x102DF "Carian")
    (?\x10300 ?\x1032F "Old Italic")
    (?\x10330 ?\x1034F "Gothic")
    (?\x10380 ?\x1039F "Ugaritic")
    (?\x103A0 ?\x103DF "Old Persian")
    (?\x10400 ?\x1044F "Deseret")
    (?\x10450 ?\x1047F "Shavian")
    (?\x10480 ?\x104AF "Osmanya")
    (?\x10800 ?\x1083F "Cypriot Syllabary")
    (?\x10900 ?\x1091F "Phoenician")
    (?\x10920 ?\x1093F "Lydian")
    (?\x10A00 ?\x10A5F "Kharoshthi")
    (?\x12000 ?\x123FF "Cuneiform")
    (?\x12400 ?\x1247F "Cuneiform Numbers and Punctuation")
    (?\x1D000 ?\x1D0FF "Byzantine Musical Symbols")
    (?\x1D100 ?\x1D1FF "Musical Symbols")
    (?\x1D200 ?\x1D24F "Ancient Greek Musical Notation")
    (?\x1D300 ?\x1D35F "Tai Xuan Jing Symbols")
    (?\x1D360 ?\x1D37F "Counting Rod Numerals")
    (?\x1D400 ?\x1D7FF "Mathematical Alphanumeric Symbols")
    (?\x1F000 ?\x1F02F "Mahjong Tiles")
    (?\x1F030 ?\x1F09F "Domino Tiles")
    (?\x20000 ?\x2A6DF "CJK Unified Ideographs Extension B")
    (?\x2F800 ?\x2FA1F "CJK Compatibility Ideographs Supplement")
    (?\xE0000 ?\xE007F "Tags")
    (?\xE0100 ?\xE01EF "Variation Selectors Supplement")
    (?\xF0000 ?\xFFFFF "Supplementary Private Use Area-A")
    (?\x100000 ?\x10FFFF "Supplementary Private Use Area-B")))



-- 
Florian Beck


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Browsing Unicode Symbols
  2008-07-09 14:32       ` Florian Beck
@ 2008-07-10 11:04         ` Peter Dyballa
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Dyballa @ 2008-07-10 11:04 UTC (permalink / raw)
  To: Florian Beck; +Cc: help-gnu-emacs


Am 09.07.2008 um 16:32 schrieb Florian Beck:

> I do it with this function:

Impressive!

--
Mit friedvollen Grüßen

   Pete

To drink without thirst and to make love all the time, madam, it is  
only these which distinguish us from the other beasts.
				– Beaumarchais







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-10 11:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-08 12:58 Browsing Unicode Symbols Nordlöw
2008-07-08 15:37 ` Peter Dyballa
     [not found] ` <mailman.14397.1215531445.18990.help-gnu-emacs@gnu.org>
2008-07-08 22:52   ` Florian Beck
2008-07-09  8:08     ` Peter Dyballa
     [not found]     ` <mailman.14434.1215590915.18990.help-gnu-emacs@gnu.org>
2008-07-09 14:32       ` Florian Beck
2008-07-10 11:04         ` Peter Dyballa
2008-07-09  7:43 ` Xah

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.