New text "style" options (bold, italic, underline, etc)

You have encountered a problem using Far macros? Here you can get help.
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

New text "style" options (bold, italic, underline, etc)

Post by Epsteyn »

The new "style" options (bold, italic, double, overline, strikout, faint and blink) in "File highlights and sort groups" don't work. The only option that works is "underline". How can I do to make all these style options work? Thanx!
Last edited by HaRT on Sun 15 Aug, 2021 01:18, edited 1 time in total.
Reason: Improved Topic Title
Yegor
Posts: 1326
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 32 times
Been thanked: 61 times

New "style" options

Post by Yegor »

Please try to use a different terminal such as Windows Terminal (works fine there) or maybe ConEmu (never tried). Conhost (a defaut one) does not support any styles except underline.
Last edited by Yegor on Fri 13 Aug, 2021 04:52, edited 1 time in total.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

New "style" options

Post by DrKnS »

Yegor wrote: Fri 13 Aug, 2021 04:52Conhost (a defaut one) does not support any styles except underline.
It will after one of the future big updates of Windows 10.
Until then, yes, Windows Terminal or Windows Terminal Preview should have the best support for these.

Also, it's not really obvious, but the latest Windows Terminal always comes with the latest conhost. You can copy C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe\OpenConsole.exe (or similar) somewhere and run OpenConsole path\to\far.exe to use it instead of the default conhost.

Conemu currently supports bold / italic / underline only, but receives the whole set of attributes from Far and can potentially support more. Talk to @Maximus5 if you're interested.
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

New "style" options

Post by Epsteyn »

Thank you both for the explanation!
I used the windows terminal, but FAR appears with different colors and fonts that I can not change.
image.png
Should I try with another console?
Yegor
Posts: 1326
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 32 times
Been thanked: 61 times

New "style" options

Post by Yegor »

@DrKnS, you are right I'm running Windows 11 preview (22000.132), and now I see that only bold does not work for the moment out of the box (with conhost and OpenConsole). But definitely all styles except underline did not work with Windows 10 21H1 as far as I remember.
Last edited by Yegor on Fri 13 Aug, 2021 16:37, edited 1 time in total.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

New "style" options

Post by Epsteyn »

Which is the best console to use FAR with the same appearance (fonts, colors, etc.) as the original command prompt console?
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

New "style" options

Post by DrKnS »

Epsteyn wrote: Fri 13 Aug, 2021 16:23 FAR appears with different colors and fonts that I can not change
You can change colors in the terminal settings under "color schemes". The good old one is called "vintage" there.
Having said that, the Windows Terminal has a lot of other issues, so don't be surprised if something works strange or doesn't work at all.
Yegor wrote: Fri 13 Aug, 2021 16:31I see that only bold does not work for the moment out of the box
Actually it does work, but not in the way you or any other sane person would expect: "bold" is treated as "intense", so to see its effect try it with non-intense foreground colors (0-7). Yes, it's pointless, since you can just use the bright color in the first place.
Fortunately, it looks like the common sense has eventually prevailed (at least in WT). Almost. As usual, if you're interested - it's better to go there, check the linked issues, vote, comment etc.
Epsteyn wrote: Fri 13 Aug, 2021 16:38 Which is the best console to use FAR with the same appearance (fonts, colors, etc.) as the original command prompt console?
As I mentioned above, you can extract OpenConsole.exe from the Windows Terminal directory and use it with Far or any other console app. It's the same as the default conhost, but with the latest fixes and improvements.
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

New "style" options

Post by Epsteyn »

As I mentioned above, you can extract OpenConsole.exe from the Windows Terminal directory and use it with Far or any other console app. It's the same as the default conhost, but with the latest fixes and improvements.
Thank you very much! It really worked!
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

New text "style" options (bold, italic, underline, etc)

Post by HaRT »

DrKnS, I attempted using these new options and faced an issue that I cannot easily e.g. define file highlighting color based on file name and text style (e.g. underline) based on file's attributes (e.g. Reparse point). Contrary to every other aspect of files highlighting, every highlighting group either sets or clears each style trait, it cannot just leave it intact. I had to place the (new) group in question to the end of the list to achieve the desired effect now but it can lead to the same combinatorial explosion of the number of groups in future as in the initial version of Attribution.
To prevent this and make the new settings more uniform to the existing ones, I'd suggest making the style checkboxes tri-state, the indeterminate state meaning “don't change”. Alternatively, the Style: label may be changed to a [ ] Style: checkbox that will control whether style changes should be applied.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

New text "style" options (bold, italic, underline, etc)

Post by DrKnS »

HaRT wrote: Sun 15 Aug, 2021 02:12leave it intact
Set [x] Inherit and nothing else.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

New text "style" options (bold, italic, underline, etc)

Post by HaRT »

DrKnS wrote: Sun 15 Aug, 2021 02:23 Set [x] Inherit and nothing else.
Thank you. Yet it raises a number of concerns.
First, it's counter-intuitive. The UI assumes that “Inherit” is just one of the independent styles, whereas it turns out to be quite a different thing in reality. The above suggested UI ([ ] Style:) would make this obvious (and avoids the non-uniform item).
Next, why are pre-existed highlighting groups migrated with “Inherit” being OFF? It means that every FAR user who wants to set up nontrivial highlighting rules using style traits will have to either set [x] Inherit manually for each highlighting group to prevent them clearing style traits set up by higher groups OR to partition all groups using the styles lower than the pre-existed ones. Both approaches are far from ideal, and it would be much friendlier if FAR just migrated all “legacy” groups as non-changing the styles.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

New text "style" options (bold, italic, underline, etc)

Post by DrKnS »

HaRT wrote: Sun 15 Aug, 2021 03:02The above suggested UI ([ ] Style:) would make this obvious (and avoids the non-uniform item).
"[ ] Style:" suggests that it would be ignored completely when untoggled, which is not the case.
why are pre-existed highlighting groups migrated with “Inherit” being OFF?
Because it's just a flag among the other flags and there's no way to distinguish "the group hasn't been migrated yet, need to set" from "the user cleared it manually, leave it be" without polluting the configuration with new flags like "settings_migrated_to_build_xxx", which, given that the color styling is hardly that important in the first place, doesn't work out-of-the-box yet and not that many people have custom highlighting at all, isn't worth the effort and extra complexity.
If going through the UI is too tedious, you can export the configuration as xml, search & replace flags in a text editor and import it back.
User avatar
HaRT
Moderator
Posts: 10806
Joined: Tue 30 Aug, 2005 17:21
Has thanked: 220 times
Been thanked: 357 times

New text "style" options (bold, italic, underline, etc)

Post by HaRT »

DrKnS wrote: Sun 15 Aug, 2021 03:39 "[ ] Style:" suggests that it would be ignored completely when untoggled, which is not the case.
Thanks for the explanation. Yet to make it obvious that “Inherit” is not uniform to the other style flags, I suggest giving it some visual distinction, e.g. .
Also, would be handy.
Фар есть инструмент, а не нянька. © 2009 DrKnS
User avatar
DrKnS
Posts: 6114
Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times

New text "style" options (bold, italic, underline, etc)

Post by DrKnS »

HaRT wrote: Sun 15 Aug, 2021 03:56 I suggest giving it some visual distinction
Thank you, added.
Epsteyn
Posts: 16
Joined: Sun 15 Nov, 2020 14:21
Has thanked: 2 times

New text "style" options (bold, italic, underline, etc)

Post by Epsteyn »

Please, can someone explain to me how does "inherit" operates? Thank you
Post Reply

Return to “Support and Troubleshooting”