set title '{/Times-New-Roman aaa}' font ',24'
plot x
"Times New Roman" is default selif font on windows . On enhanced text mode does not allow font name with space. In fontconfig releted terminals (gd(png, ...), cairo (wxt, pngciaro, ....)), and postscirpt one can use font name with hyphen like the above example.
However, this font specication is ignored on x11, windows, qt, emf and svg terminals.
(I have not tested on other terminals.)
I think that font specification like /Times-New-Roman on enhanced text should be available on all terminals.
Can you give an example that shows why the font needs to be specified inside the label text rather than outside? For me it works fine to place the font selection outside in most cases:
It is true that there are places this does not work. For example you cannot say
plot sin(x) title "函数 sin(x)" font "Arial:Italic"We could add that. Would it help?
There are a lot of Japanese fonts selection. The above exmaple, we cannot select arbitrary pair of Japanese and Laten fonts.
At this moment, I am too busy to make some examples so that please wait a while.
Anyway thanks your comments.
I have made an example
Yes. So that works correctly, right?
I get the same here without the large "0" symbols at the top.
Sorry I only show an example. As I said at first, font name with hyphen works on cairo based terminals. On windows terminals MS Mincho and MS PMIncho are ingnored as an attached file.
Last edit: Tatsuro MATSUOKA 2019-02-09
I tried the below again with "PANGOCAIRO_BACKEND=fc"
"PANGOCAIRO_BACKEND=win32"
wxt:
Times does not work - uses default font
TimesNewRoman does not work - uses default font
Times-New-Roman works and fins MS Times New Roman
"PANGOCAIRO_BACKEND=fc"
Times works and finds MS Times New Roman
TimesNewRoman works and finds MS Times New Roman
Times-New-Roman works and finds MS Times New Roman
Honestly speaking, I myself usually use cairo based terminals so that the issue is not serious personally. However, I think that teriminal dependent behaivors are preferrablelly removed.
I also think that enhanced text should keep to support local font specificcation like "{/fontname}" as for use Japanese-English combined text.
I have modified the enhanced text code for both 5.2 and 5.3 so that you can provide a font name in quotes. This allows you to pass "Times New Roman" and a quoted string.
This does not change the font requirements of any terminal. If the terminal did not recognize Times New Roman before this change, it will still not recognize it after the change. However if the terminal does recognize the font name you can now use it in enhanced text markup.
I have confirmed the font name in qutoes works fine on windows terminal using the shapshot you modified. Thanks!