public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
@ 2014-09-03 12:43 Sebastien Vauban
  2014-09-03 14:00 ` Ken Brown
  2014-09-10 19:25 ` Ken Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastien Vauban @ 2014-09-03 12:43 UTC (permalink / raw)
  To: cygwin

Hello,

As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
Emacs and Cygwin Emacs can't display the white right-pointing
triangle [1] coherently for the same fonts:

- win32 Emacs always can display it, in all fonts,

- Cygwin Emacs can't display it with Consolas, Courier New and Lucida
  (among others).

MWE:

--8<---------------cut here---------------start------------->8---
;; these fonts only display (special?) UTF-8 chars (here: the white
;; right-pointing triangle) in win32 binary of Emacs

(modify-all-frames-parameters '((font . "Consolas-10")))
(char-displayable-p ?\u25B7)

(modify-all-frames-parameters '((font . "Courier New-9")))
(char-displayable-p ?\u25B7)

(modify-all-frames-parameters '((font . "Lucida Console-9")))
(char-displayable-p ?\u25B7)

;; these work for both win32 binary of Emacs + Cygwin Emacs

(modify-all-frames-parameters '((font . "DejaVu Sans Mono-9")))
(char-displayable-p ?\u25B7)

(modify-all-frames-parameters '((font . "Lucida Sans Typewriter-9")))
(char-displayable-p ?\u25B7)
--8<---------------cut here---------------end--------------->8---

Any idea why such differences?

Best regards,
  Seb

[1] http://www.scarfboy.com/coding/unicode-tool?s=U%2B25B7

-- 
Sebastien Vauban


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-03 12:43 Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs Sebastien Vauban
@ 2014-09-03 14:00 ` Ken Brown
  2014-09-03 15:04   ` Sebastien Vauban
  2014-09-10 19:25 ` Ken Brown
  1 sibling, 1 reply; 10+ messages in thread
From: Ken Brown @ 2014-09-03 14:00 UTC (permalink / raw)
  To: cygwin


On 9/3/2014 8:41 AM, Sebastien Vauban wrote:
> Hello,
>
> As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
> Emacs and Cygwin Emacs can't display the white right-pointing
> triangle [1] coherently for the same fonts:
>
> - win32 Emacs always can display it, in all fonts,
>
> - Cygwin Emacs can't display it with Consolas, Courier New and Lucida
>    (among others).
>
> MWE:
>
> --8<---------------cut here---------------start------------->8---
> ;; these fonts only display (special?) UTF-8 chars (here: the white
> ;; right-pointing triangle) in win32 binary of Emacs
>
> (modify-all-frames-parameters '((font . "Consolas-10")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Courier New-9")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Lucida Console-9")))
> (char-displayable-p ?\u25B7)
>
> ;; these work for both win32 binary of Emacs + Cygwin Emacs
>
> (modify-all-frames-parameters '((font . "DejaVu Sans Mono-9")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Lucida Sans Typewriter-9")))
> (char-displayable-p ?\u25B7)
> --8<---------------cut here---------------end--------------->8---
>
> Any idea why such differences?

I'm on vacation, but I'll look into this next week when I get back.  In 
the meantime, could you say which version of Cygwin emacs you're using? 
  Is it emacs-X11 or emacs-w32?

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-03 14:00 ` Ken Brown
@ 2014-09-03 15:04   ` Sebastien Vauban
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastien Vauban @ 2014-09-03 15:04 UTC (permalink / raw)
  To: cygwin

Hello,

Ken Brown wrote:
> On 9/3/2014 8:41 AM, Sebastien Vauban wrote:
>> As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
>> Emacs and Cygwin Emacs can't display the white right-pointing
>> triangle [1] coherently for the same fonts:
>>
>> - win32 Emacs always can display it, in all fonts,
>>
>> - Cygwin Emacs can't display it with Consolas, Courier New and Lucida
>>    (among others).
>>
>> MWE:
>>
>> --8<---------------cut here---------------start------------->8---
>> ;; these fonts only display (special?) UTF-8 chars (here: the white
>> ;; right-pointing triangle) in win32 binary of Emacs
>>
>> (modify-all-frames-parameters '((font . "Consolas-10")))
>> (char-displayable-p ?\u25B7)
>>
>> (modify-all-frames-parameters '((font . "Courier New-9")))
>> (char-displayable-p ?\u25B7)
>>
>> (modify-all-frames-parameters '((font . "Lucida Console-9")))
>> (char-displayable-p ?\u25B7)
>> --8<---------------cut here---------------end--------------->8---
>>
>> Any idea why such differences?
>
> I'm on vacation, but I'll look into this next week when I get back.  In the
> meantime, could you say which version of Cygwin emacs you're using? Is it
> emacs-X11 or emacs-w32?

Yes, I'm using Cygwin Emacs w32.

Best regards,
  Seb

-- 
Sebastien Vauban

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-03 12:43 Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs Sebastien Vauban
  2014-09-03 14:00 ` Ken Brown
@ 2014-09-10 19:25 ` Ken Brown
  2014-09-11  9:19   ` Sebastien Vauban
  2014-09-11  9:27   ` Marco Atzeri
  1 sibling, 2 replies; 10+ messages in thread
From: Ken Brown @ 2014-09-10 19:25 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

On 9/3/2014 8:41 AM, Sebastien Vauban wrote:
> Hello,
>
> As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
> Emacs and Cygwin Emacs can't display the white right-pointing
> triangle [1] coherently for the same fonts:
>
> - win32 Emacs always can display it, in all fonts,
>
> - Cygwin Emacs can't display it with Consolas, Courier New and Lucida
>    (among others).
>
> MWE:
>
> --8<---------------cut here---------------start------------->8---
> ;; these fonts only display (special?) UTF-8 chars (here: the white
> ;; right-pointing triangle) in win32 binary of Emacs
>
> (modify-all-frames-parameters '((font . "Consolas-10")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Courier New-9")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Lucida Console-9")))
> (char-displayable-p ?\u25B7)
>
> ;; these work for both win32 binary of Emacs + Cygwin Emacs
>
> (modify-all-frames-parameters '((font . "DejaVu Sans Mono-9")))
> (char-displayable-p ?\u25B7)
>
> (modify-all-frames-parameters '((font . "Lucida Sans Typewriter-9")))
> (char-displayable-p ?\u25B7)
> --8<---------------cut here---------------end--------------->8---
>
> Any idea why such differences?
>
> Best regards,
>    Seb
>
> [1] http://www.scarfboy.com/coding/unicode-tool?s=U%2B25B7

I've had a chance to look at this now, and it doesn't seem to have 
anything to do with emacs.

I've created a text file 25b7.txt (attached) with a single line 
containing the white right-pointing-triangle.  When I issue the command 
"cat 25b7.txt" in a mintty terminal, I sometimes see an empty rectangle 
(meaning the character can't be displayed), and I sometimes see the 
white right-pointing triangle, depending on which font I select in the 
mintty options.

I don't know enough about fonts and UTF-8 encoding to be able to shed 
any more light on this.  Maybe someone else can help.

Ken

[-- Attachment #2: 25b7.txt --]
[-- Type: text/plain, Size: 8 bytes --]

â–·


[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-10 19:25 ` Ken Brown
@ 2014-09-11  9:19   ` Sebastien Vauban
  2014-09-11 10:23     ` Achim Gratz
  2014-09-11  9:27   ` Marco Atzeri
  1 sibling, 1 reply; 10+ messages in thread
From: Sebastien Vauban @ 2014-09-11  9:19 UTC (permalink / raw)
  To: cygwin

Hello,

Ken Brown wrote:
> On 9/3/2014 8:41 AM, Sebastien Vauban wrote:
>> As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
>> Emacs and Cygwin Emacs can't display the white right-pointing
>> triangle coherently for the same fonts:
>>
>> - win32 Emacs always can display it, in all fonts,
>>
>> - Cygwin Emacs can't display it with Consolas, Courier New and Lucida
>>    (among others).
>>
>> MWE:
>>
>> --8<---------------cut here---------------start------------->8---
>> ;; these fonts only display (special?) UTF-8 chars (here: the white
>> ;; right-pointing triangle) in win32 binary of Emacs
>>
>> (modify-all-frames-parameters '((font . "Consolas-10")))
>> (char-displayable-p ?\u25B7)
>>
>> (modify-all-frames-parameters '((font . "Lucida Console-9")))
>> (char-displayable-p ?\u25B7)
>>
>> ;; these work for both win32 binary of Emacs + Cygwin Emacs
>>
>> (modify-all-frames-parameters '((font . "DejaVu Sans Mono-9")))
>> (char-displayable-p ?\u25B7)
>>
>> (modify-all-frames-parameters '((font . "Lucida Sans Typewriter-9")))
>> (char-displayable-p ?\u25B7)
>> --8<---------------cut here---------------end--------------->8---
>>
>> Any idea why such differences?
>
> I've had a chance to look at this now, and it doesn't seem to have
> anything to do with emacs.
>
> I've created a text file 25b7.txt (attached) with a single line
> containing the white right-pointing-triangle.  When I issue the
> command "cat 25b7.txt" in a mintty terminal, I sometimes see an empty
> rectangle (meaning the character can't be displayed), and I sometimes
> see the white right-pointing triangle, depending on which font
> I select in the mintty options.
>
> I don't know enough about fonts and UTF-8 encoding to be able to shed
> any more light on this.  Maybe someone else can help.

The problem would be with Cygwin in general, then, if not limited to
Emacs.

But why the same fonts (Consolas, Lucida Console) don't display the same
range of characters in both worlds?

Best regards,
  Seb

-- 
Sebastien Vauban


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-10 19:25 ` Ken Brown
  2014-09-11  9:19   ` Sebastien Vauban
@ 2014-09-11  9:27   ` Marco Atzeri
  1 sibling, 0 replies; 10+ messages in thread
From: Marco Atzeri @ 2014-09-11  9:27 UTC (permalink / raw)
  To: cygwin

On 10/09/2014 19:49, Ken Brown wrote:
> On 9/3/2014 8:41 AM, Sebastien Vauban wrote:
>> Hello,
>>
>> As you can see on http://screencast.com/t/XTTv9DSAC, win32 binaries of
>> Emacs and Cygwin Emacs can't display the white right-pointing
>> triangle [1] coherently for the same fonts:
>>
>> - win32 Emacs always can display it, in all fonts,
>>
>> - Cygwin Emacs can't display it with Consolas, Courier New and Lucida
>>    (among others).
>>
>> MWE:
>>
[cut]
>>
>> Any idea why such differences?
>>
>> Best regards,
>>    Seb
>>
>> [1] http://www.scarfboy.com/coding/unicode-tool?s=U%2B25B7
>
> I've had a chance to look at this now, and it doesn't seem to have
> anything to do with emacs.
>
> I've created a text file 25b7.txt (attached) with a single line
> containing the white right-pointing-triangle.  When I issue the command
> "cat 25b7.txt" in a mintty terminal, I sometimes see an empty rectangle
> (meaning the character can't be displayed), and I sometimes see the
> white right-pointing triangle, depending on which font I select in the
> mintty options.

mintty is using windows fonts as such it needs
that MS provides a full set.

Using charmap (windows Character Map) I can see that 25B7
is not available in Consolas while for example 25B8 (small black )
and 25BA (large black) are available.
In other fonts (like Courier new) only 25BA is available and 25B8
is missing...


> I don't know enough about fonts and UTF-8 encoding to be able to shed
> any more light on this.  Maybe someone else can help.
>
> Ken

It seems not a cygwin fault...

Regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-11  9:19   ` Sebastien Vauban
@ 2014-09-11 10:23     ` Achim Gratz
  2014-09-11 11:27       ` Sebastien Vauban
  0 siblings, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2014-09-11 10:23 UTC (permalink / raw)
  To: cygwin

Sebastien Vauban writes:
> The problem would be with Cygwin in general, then, if not limited to
> Emacs.
>
> But why the same fonts (Consolas, Lucida Console) don't display the same
> range of characters in both worlds?

You seem to assume that those fonts define that particular glyph.  Both
fonts you use as an example exist in multiple versions with differing
UTF-8 support.  If they don't have that glyph (which is likely, given
the results you report), then Emacs would try to get it from another
font with the same dimensions (I don't know if mintty does font
substitution and if so, how) and the results very much depend on the
font maps used.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-11 10:23     ` Achim Gratz
@ 2014-09-11 11:27       ` Sebastien Vauban
  2014-09-11 13:05         ` Andrey Repin
  2014-09-11 21:12         ` Ken Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Sebastien Vauban @ 2014-09-11 11:27 UTC (permalink / raw)
  To: cygwin

Achim Gratz wrote:
> Sebastien Vauban writes:
>> The problem would be with Cygwin in general, then, if not limited to
>> Emacs.
>>
>> But why the same fonts (Consolas, Lucida Console) don't display the same
>> range of characters in both worlds?
>
> You seem to assume that those fonts define that particular glyph.

Yes, I was.

> Both fonts you use as an example exist in multiple versions with
> differing UTF-8 support.  If they don't have that glyph (which is
> likely, given the results you report), then Emacs would try to get it
> from another font with the same dimensions (I don't know if mintty
> does font substitution and if so, how) and the results very much
> depend on the font maps used.

I didn't know about that mechanism. But, then, the question is: why does
Windows Emacs find a substitution, and not Cygwin Emacs (for the same
font)?

Best regards,
  Seb

-- 
Sebastien Vauban


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-11 11:27       ` Sebastien Vauban
@ 2014-09-11 13:05         ` Andrey Repin
  2014-09-11 21:12         ` Ken Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Andrey Repin @ 2014-09-11 13:05 UTC (permalink / raw)
  To: Sebastien Vauban, cygwin

Greetings, Sebastien Vauban!

>>> The problem would be with Cygwin in general, then, if not limited to
>>> Emacs.
>>>
>>> But why the same fonts (Consolas, Lucida Console) don't display the same
>>> range of characters in both worlds?
>>
>> You seem to assume that those fonts define that particular glyph.

> Yes, I was.

>> Both fonts you use as an example exist in multiple versions with
>> differing UTF-8 support.  If they don't have that glyph (which is
>> likely, given the results you report), then Emacs would try to get it
>> from another font with the same dimensions (I don't know if mintty
>> does font substitution and if so, how) and the results very much
>> depend on the font maps used.

> I didn't know about that mechanism. But, then, the question is: why does
> Windows Emacs find a substitution, and not Cygwin Emacs (for the same
> font)?

Because of different substitution mechanics.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 11.09.2014, <16:30>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs
  2014-09-11 11:27       ` Sebastien Vauban
  2014-09-11 13:05         ` Andrey Repin
@ 2014-09-11 21:12         ` Ken Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Ken Brown @ 2014-09-11 21:12 UTC (permalink / raw)
  To: cygwin; +Cc: Daniel Colascione

On 9/11/2014 6:21 AM, Sebastien Vauban wrote:
> Achim Gratz wrote:
>> Both fonts you use as an example exist in multiple versions with
>> differing UTF-8 support.  If they don't have that glyph (which is
>> likely, given the results you report), then Emacs would try to get it
>> from another font with the same dimensions (I don't know if mintty
>> does font substitution and if so, how) and the results very much
>> depend on the font maps used.
>
> I didn't know about that mechanism. But, then, the question is: why does
> Windows Emacs find a substitution, and not Cygwin Emacs (for the same
> font)?

It's clear that I was wrong when I said that this doesn't seem to have 
anything to do with emacs.  The problem might be that the Cygwin-w32 
build of emacs is a relatively recent invention and may still need some 
tweaking to get all the GUI features working properly.  If you or 
someone else is motivated enough, I'm sure it would be possible to 
figure out how the Windows build finds a glyph for characters that don't 
have one in the chosen font, and to port that to the Cygwin-w32 build. 
I'm copying Daniel Colascione, the author of that build, to see if he 
has any comments.  Dan, the thread starts here:

   https://cygwin.com/ml/cygwin/2014-09/msg00052.html

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2014-09-11 15:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 12:43 Font support of UTF-8 chars differ between w32 Emacs and Cygwin Emacs Sebastien Vauban
2014-09-03 14:00 ` Ken Brown
2014-09-03 15:04   ` Sebastien Vauban
2014-09-10 19:25 ` Ken Brown
2014-09-11  9:19   ` Sebastien Vauban
2014-09-11 10:23     ` Achim Gratz
2014-09-11 11:27       ` Sebastien Vauban
2014-09-11 13:05         ` Andrey Repin
2014-09-11 21:12         ` Ken Brown
2014-09-11  9:27   ` Marco Atzeri

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).