Re: [External] : Re: missing a character / font in agenda?

2022-08-06 Thread Ihor Radchenko
Max Nikulin  writes:

> Another approach would be assuming reasonable set of modern fonts and 
> providing some defcustom to switch to legacy compatibility mode.

This whole thread is about a single defcustom already.
I do not see much point providing yet another defcustom on top.
`char-displayable-p' check should be good enough in most cases, except
some strange font mapping settings. In the latter cases, users can
always customize org-agenda-current-time-string manually.

Ideally, we need to find a more reliable alternative to
`char-displayable-p'.

Best,
Ihor

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92



Re: [External] : Re: missing a character / font in agenda?

2022-08-05 Thread Max Nikulin

On 05/08/2022 13:15, Ihor Radchenko wrote:

Max Nikulin writes:


DejaVuSansMono has at least
- "\u{21fd}" "⇽" LEFTWARDS OPEN-HEADED ARROW
https://util.unicode.org/UnicodeJsps/character.jsp?a=21fd
- "\u{2190}" "←" LEFTWARDS ARROW
https://util.unicode.org/UnicodeJsps/character.jsp?a=2190
from https://en.wikipedia.org/wiki/Arrows_(Unicode_block)


"⇽" looks better on my system. However, I do not see "⇽" LEFTWARDS
OPEN-HEADED ARROW in Liberation Fonts used by default in Emacs on my
system. Though I only tested using emacs -Q + M-x describe-char


You are right. Courier New is immortal and fonts created to be 
metric-compatible with it will outlive this font. I forgot about such 
compatibility test.


Another approach would be assuming reasonable set of modern fonts and 
providing some defcustom to switch to legacy compatibility mode.





Re: [External] : Re: missing a character / font in agenda?

2022-08-05 Thread Ihor Radchenko
Max Nikulin  writes:

> DejaVuSansMono has at least
> - "\u{21fd}" "⇽" LEFTWARDS OPEN-HEADED ARROW 
> https://util.unicode.org/UnicodeJsps/character.jsp?a=21fd
> - "\u{2190}" "←" LEFTWARDS ARROW 
> https://util.unicode.org/UnicodeJsps/character.jsp?a=2190
> from https://en.wikipedia.org/wiki/Arrows_(Unicode_block)

"⇽" looks better on my system. However, I do not see "⇽" LEFTWARDS
OPEN-HEADED ARROW in Liberation Fonts used by default in Emacs on my
system. Though I only tested using emacs -Q + M-x describe-char

Best,
Ihor



Re: [External] : Re: missing a character / font in agenda?

2022-07-18 Thread Max Nikulin

On 17/07/2022 15:58, Ihor Radchenko wrote:

Juan Manuel Macías writes:


I think LEFTWARDS ARROW / #2190 of the 'arrows' Unicode block is much
more common:


Thanks for testing!
I now changed org-agenda to use LEFTWARDS ARROW in b4a72ddf9.

This does not completely solve the reported problem but at least less
users will suffer from it.


At least in Noto Sans Mono (default font in Kubuntu, unsure concerning 
vanilla KDE) \u{2190} "←" arrow is below other dashes like - or —. 
Another symbol \u{21fd} "⇽" LEFTWARDS OPEN-HEADED ARROW from the same 
arrows Unicode block does not has such problem in this font.






Re: [External] : Re: missing a character / font in agenda?

2022-07-18 Thread Daniel Ortmann

I am not seeing the problem anymore after installing the Symbola fonts.

On 7/16/22 04:15, Ihor Radchenko wrote:

Daniel Ortmann  writes:


More information on that character:

   position: 195 of 690 (28%), column: 26
      character: ⭠ (displayed as ⭠) (codepoint 11104, #o25540,
#x2b60)
    charset: unicode-bmp (Unicode Basic Multilingual Plane
(U+..U+))
code point in charset: 0x2B60
     script: symbol
     syntax: _     which means: symbol
   category: .:Base
   to input: type "C-x 8 RET 2b60" or "C-x 8 RET LEFTWARDS
TRIANGLE-HEADED ARROW"
    buffer code: #xE2 #xAD #xA0
      file code: #xE2 #xAD #xA0 (encoded by coding system utf-8-unix)
    display: no font available

Character code properties: customize what to show
    name: LEFTWARDS TRIANGLE-HEADED ARROW
    general-category: So (Symbol, Other)
    decomposition: (11104) ('⭠')

Would you mind sending a bug report to Emacs devs?
If you run (char-displayable-p ?⭠) on your side but yet not being able
to see the symbol properly, we can hopefully get some good suggestions
(or even a fix) from Emacs guys.

Best,
Ihor





Re: [External] : Re: missing a character / font in agenda?

2022-07-17 Thread Ihor Radchenko
Juan Manuel Macías  writes:

> I think LEFTWARDS ARROW / #2190 of the 'arrows' Unicode block is much
> more common:

Thanks for testing!
I now changed org-agenda to use LEFTWARDS ARROW in b4a72ddf9.

This does not completely solve the reported problem but at least less
users will suffer from it.

Best,
Ihor



Re: missing a character / font in agenda?

2022-07-16 Thread Ihor Radchenko
Daniel Ortmann  writes:

> More information on that character:
>
>   position: 195 of 690 (28%), column: 26
>      character: ⭠ (displayed as ⭠) (codepoint 11104, #o25540, 
> #x2b60)
>    charset: unicode-bmp (Unicode Basic Multilingual Plane 
> (U+..U+))
> code point in charset: 0x2B60
>     script: symbol
>     syntax: _     which means: symbol
>   category: .:Base
>   to input: type "C-x 8 RET 2b60" or "C-x 8 RET LEFTWARDS 
> TRIANGLE-HEADED ARROW"
>    buffer code: #xE2 #xAD #xA0
>      file code: #xE2 #xAD #xA0 (encoded by coding system utf-8-unix)
>    display: no font available
>
> Character code properties: customize what to show
>    name: LEFTWARDS TRIANGLE-HEADED ARROW
>    general-category: So (Symbol, Other)
>    decomposition: (11104) ('⭠')

Would you mind sending a bug report to Emacs devs?
If you run (char-displayable-p ?⭠) on your side but yet not being able
to see the symbol properly, we can hopefully get some good suggestions
(or even a fix) from Emacs guys.

Best,
Ihor


Re: [External] : Re: missing a character / font in agenda?

2022-07-13 Thread Max Nikulin

On 13/07/2022 07:26, Stefan Kangas wrote:

Ihor Radchenko writes:


I think this should be considered a bug, since the glyph used (LEFTWARDS
TRIANGLE-HEADED ARROW / #2b60) is not present in most fonts.


If that is true (I don't know) then maybe we should just use a more
ubiquitous glyph?


Disclaimer: I am not an expert in Unicode.

DejaVuSansMono has at least
- "\u{21fd}" "⇽" LEFTWARDS OPEN-HEADED ARROW 
https://util.unicode.org/UnicodeJsps/character.jsp?a=21fd
- "\u{2190}" "←" LEFTWARDS ARROW 
https://util.unicode.org/UnicodeJsps/character.jsp?a=2190

from https://en.wikipedia.org/wiki/Arrows_(Unicode_block)



Re: [External] : Re: missing a character / font in agenda?

2022-07-13 Thread Juan Manuel Macías
Stefan Kangas writes:

> If that is true (I don't know) then maybe we should just use a more
> ubiquitous glyph?

I have done a quick test with some fonts that are ---I believe--- quite
popular. This character is missing from DejaVu Sans Mono, Iosevka,
Source Pro, Fira Code and Hack. JuliaMono does include it:

https://i.imgur.com/O3urnxa.png

I think LEFTWARDS ARROW / #2190 of the 'arrows' Unicode block is much
more common:

https://i.imgur.com/h0NQXvG.png

Best regards,

Juan Manuel 



Re: [External] : Re: missing a character / font in agenda?

2022-07-13 Thread Greg Minshall
for what it's worth, without the symbola font on my machine (though i've
now added it), i seem to see the left-arrow 2b60 rendered using:

ftcrhb:-GNU-Unifont-normal-normal-normal-Sans-Serif-16-*-*-*-c-80-iso10646-1 
(#x2B61)

(if i'm interpreting the output of [C-u C-x =] correctly.)

cheers, Greg



Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Stefan Kangas
Ihor Radchenko  writes:

>>> I think this should be considered a bug, since the glyph used (LEFTWARDS
>>> TRIANGLE-HEADED ARROW / #2b60) is not present in most fonts.

If that is true (I don't know) then maybe we should just use a more
ubiquitous glyph?

> The commit is supposed to fall back to ASCII symbol if the Unicode
> variant is not available, but apparently the check failed for some
> reason:
[...]
> Stefan, do you have any idea what can go wrong here?
>
> The only thing I can think about is warning in the char-displayable-p
> docstring:
>
> >> On a multi-font display, the test is only whether there is an
> >> appropriate font from the selected frame's fontset to display
> >> CHAR's charset in general.  Since fonts may be specified on a
> >> per-character basis, this may not be accurate.

I don't think we specify a particular font here, do we?  So it seems
like there might be a bug in Emacs here?  I'm not an expert on this
stuff by any means, but I would probably 'M-x report-emacs-bug' to
find out why 'char-displayable-p' would say that a character is
displayable when it's not.



Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Ihor Radchenko
Daniel Ortmann  writes:

> Ihor,
> What are your thoughts?
>
> On 7/12/22 15:03, Juan Manuel Macías wrote:
>> Juan Manuel Macías writes:
>>
>>> The most reasonable thing would be to use a more
>>> common symbol. But I'm still intrigued by the origin of that symbol...
>> It seems that the culprit is in line 1592 of org-agenda.el
>>
>> I think this should be considered a bug, since the glyph used (LEFTWARDS
>> TRIANGLE-HEADED ARROW / #2b60) is not present in most fonts.

The offending commit is 998a0aacd from Stefan.
The commit is supposed to fall back to ASCII symbol if the Unicode
variant is not available, but apparently the check failed for some
reason:

(defcustom org-agenda-current-time-string
  (if (and (display-graphic-p)
   (char-displayable-p ?⭠)
   (char-displayable-p ?─))
  "⭠ now ───"
"now - - - - - - - - - - - - - - - - - - - - - - - - -")
  "The string for the current time marker in the agenda."
  :group 'org-agenda-time-grid
  :version "29.1"
  :type 'string)

Stefan, do you have any idea what can go wrong here?

The only thing I can think about is warning in the char-displayable-p
docstring:

>> On a multi-font display, the test is only whether there is an
>> appropriate font from the selected frame's fontset to display
>> CHAR's charset in general.  Since fonts may be specified on a
>> per-character basis, this may not be accurate.

Best,
Ihor



Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Daniel Ortmann

Ihor,
What are your thoughts?

On 7/12/22 15:03, Juan Manuel Macías wrote:

Juan Manuel Macías writes:


The most reasonable thing would be to use a more
common symbol. But I'm still intrigued by the origin of that symbol...

It seems that the culprit is in line 1592 of org-agenda.el

I think this should be considered a bug, since the glyph used (LEFTWARDS
TRIANGLE-HEADED ARROW / #2b60) is not present in most fonts.

Best regards,

Juan Manuel





Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Juan Manuel Macías
Juan Manuel Macías writes:

> The most reasonable thing would be to use a more
> common symbol. But I'm still intrigued by the origin of that symbol...

It seems that the culprit is in line 1592 of org-agenda.el

I think this should be considered a bug, since the glyph used (LEFTWARDS
TRIANGLE-HEADED ARROW / #2b60) is not present in most fonts.

Best regards,

Juan Manuel



Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Juan Manuel Macías
Hi, Daniel,

Daniel Ortmann writes:

> – Would using the ASCII '<' character be a better solution?

I've done a quick test and a few very popular (and more or less
complete) fonts don't include a glyph for the LEFTWARDS TRIANGLE-HEADED
ARROW #2b60 character: DejavuSans, Iosevka, Hack Source Code Pro,
JuliaMono or Fira Code. It is a very rare symbol.

> – Is anyone else seeing this issue and missing font?

I haven't seen it, but I'm not using the Git version.

> – Is that Symbola font, or equivalent, now a true dependency?  Or is
>   there something more common which I should be using?  (Perhaps I
>   have missed a normal configuration step?)

I think Symbola should not be a dependency. I use this font just to be
able to display unusual symbols, especially on web pages when I browse
the web with eww-mode. The most reasonable thing would be to use a more
common symbol. But I'm still intrigued by the origin of that symbol...

Best regards,

Juan Manuel



Re: [External] : Re: missing a character / font in agenda?

2022-07-12 Thread Daniel Ortmann
That odd new character just showed up after a normal daily org-mode 'git 
pull'.


The Symbola.ttf font worked fine.
I used this page for for instructions.
https://linuxconfig.org/how-to-install-and-manage-fonts-on-linux

After copying the font to ~/.local/share/font/ and running the 'fc-cache 
-vf' command

... The font appears after emacs + org-mode are restarted.
(I did not need to run set-fontset-font.)

Somewhere in there I also pulled fresh org-mode and emacs code and 
rebuilt; am not sure if that was needed.


Here is how that screen now appears:



 * Would using the ASCII '<' character be a better solution?
 * Is anyone else seeing this issue and missing font?
 * What would allow that Symbola font to be available?
 * Is that Symbola font, or equivalent, now a true dependency? Or is
   there something more common which I should be using? (Perhaps I have
   missed a normal configuration step?)

Thank you!


On 7/12/22 12:58, Juan Manuel Macías wrote:

Hi,

Daniel Ortmann writes:


Any clues where this particular symbol resides?  A hint about the
package name would wonderful.  :-)

To be able to display "unusual" symbols in Emacs, I usually use the
symbola font:

You can download it here:

https://urldefense.com/v3/__https://fontlibrary.org/en/font/symbola__;!!ACWV5N9M2RV99hQ!LCWutd87ZOlNkSgFTjjR0zYsqhv6xP6ZBep63lyK7tIveH2MWiQ331YB8rJexEVU6gjcjT99EdYoJvFPvxABlZvT$  


And then:

(set-fontset-font t 'symbol (font-spec :family "Symbola"))

But I think that what is interesting here is to know how that character
has arrived. Could it be related to some new package you have installed
lately?

Best regards,

Juan Manuel


Re: missing a character / font in agenda?

2022-07-12 Thread Juan Manuel Macías
Hi,

Daniel Ortmann writes:

> Any clues where this particular symbol resides?  A hint about the
> package name would wonderful.  :-)

To be able to display "unusual" symbols in Emacs, I usually use the
symbola font:

You can download it here:

https://fontlibrary.org/en/font/symbola

And then:

(set-fontset-font t 'symbol (font-spec :family "Symbola"))

But I think that what is interesting here is to know how that character
has arrived. Could it be related to some new package you have installed
lately?

Best regards,

Juan Manuel