Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13368 closed bug (fixed)

Repositories not indicating which are enabled

Reported by: vidrep Owned by: perelandra
Priority: normal Milestone: Unscheduled
Component: Preferences/Repositories Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

After pkgman update to hrev51000 the checkmark which indicates the currently enabled repository is missing. see attached (repositories.png)

Attachments (1)

Repositories.png (55.1 KB ) - added by vidrep 8 years ago.

Download all attachments as: .zip

Change History (19)

by vidrep, 8 years ago

Attachment: Repositories.png added

comment:1 by vidrep, 8 years ago

patch: 01

comment:2 by humdinger, 8 years ago

The issue is that while the Noto font has much going for it, it lacks quite a few symbols that the DejaVu font provides. Among them the checkmark used by Repositories. See RepRow.cpp:

field->SetString(fEnabled ? "\xE2\x9C\x94" : "");

Noto does provide the less bold checkmark with \xe2\x9c\x93. So using that instead would solve the issue.

I remember reading that not all cultures use a checkmark to indicate something positive/active. Maybe we should come up with something completely different that doesn't have a cultural background. On the one hand that makes it a little bit less intuitive for everybody, on the other, in the context it's pretty clear that "no symbol" means disabled and "any symbol" means enabled.

Some candidates:
■ - \xe2\x96\xa0
★ - \xe2\x98\x85
☉ - \xe2\x98\x89
☞ - \xe2\x98\x9e
❖ - \xe2\x9d\x96
⦿ - \xe2\xa6\xbf

comment:3 by axeld, 8 years ago

Noto is supposed to have glyphs for *all* Unicode characters. Do we have to install some more special variants of it that contains that symbol maybe?

comment:4 by axeld, 8 years ago

If we end up not using the current character (IMO a checkmark is fine -- even if it may not be commonly used in all cultures, it's commonly used with computers, and we don't do signs everyone has to understand, but an operating system :-)), I would just use what we're using for check boxes.

comment:5 by humdinger, 8 years ago

Noto may have not have all those characters. I had a quick look under linux, and its character map shows several different font families for different symbols, like DejaVu and Symbols(?) etc. So it appears to again be an issue with our lacking fallback mechanism.

I have no strong opinion pro/con the checkmark symbol, just wanted to mention it. \xe2\x9c\x93 , the less bold checkmark, that's actually available in Noto may be a good replacement. Dunno how it looks though...

comment:6 by perelandra, 8 years ago

Bold vs non-bold in DejaVu Sans: https://drive.google.com/open?id=0B8n9qMefrOQJbHNBbWpBYW92X2M

Or just use text. Replace the column header with "Status" and use "Enabled" on each row instead of a checkmark. I like a symbol though, it is easy to interpret and cleaner looking.

comment:8 by perelandra, 8 years ago

In my original Depots preflet, I used the OPT-V character for a checkmark. In Noto Sans:

https://drive.google.com/open?id=0B8n9qMefrOQJM1lpVmpaRXN2QlE

comment:9 by anevilyak, 8 years ago

Owner: set to perelandra
Status: newassigned

comment:10 by humdinger, 8 years ago

Yeah, that Noto checkmark is quite thin... Never heard of OPT-V. Is that:
√ - \xe2\x88\x9a
i.e. the square root symbol? Looks good enough to me. Better anyway than the thin one...

comment:11 by axeld, 8 years ago

We should actually fix this issue, and also install the Noto Sans Symbols font, and also use it as a fallback font. That one actually includes this and many many other symbols.

in reply to:  10 comment:12 by perelandra, 8 years ago

Replying to humdinger:

Yeah, that Noto checkmark is quite thin... Never heard of OPT-V. Is that:
√ - \xe2\x88\x9a

It is, however in some fonts it looks weird, because it puts the ceiling on the square root symbol making it less a checkmark. The checkmarks do show up with the Noto Symbol font, but only when that set is selected as the primary font, it is not used as a backup font when another Noto set is selected. So for now I think I will just use plain words instead of a symbol until the font issue can be worked out.

comment:13 by anirudh, 8 years ago

Is the problem really with the symbols of the font? I don't think so.

I replaced

field->SetString(fEnabled ? "\xE2\x9C\x94" : "");

as

field->SetString(fEnabled ? "Y" : "N");

and compiled, and the panel showed me only 'N' for the disabled repositories. 'Y' wasn't showed for the enabled repositories. Is there a problem with fEnabled return value? I'm not sure, just my thoughts.

comment:14 by perelandra, 8 years ago

By the nature of a ? test the only possibilities returned are "Y" or "N". Make sure you have the correct quotes around Y and that you don't have any hidden characters in the quotes.

comment:15 by perelandra, 8 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev51008

in reply to:  11 comment:16 by humdinger, 8 years ago

Replying to axeld:

We should actually fix this issue, and also install the Noto Sans Symbols font, and also use it as a fallback font. That one actually includes this and many many other symbols.

Oh, I didn't know that one existed... it's "unhinted" other than the rest of the "hinted" fonts of Noto. I'm adding it now to the Noto fonts package. Not sure what's needed to make it a "fallback"...

comment:17 by perelandra, 8 years ago

It's not just Noto that's the problem though, for example Bitstream Charter, Century Schoolbook L, DejaVu Serif all don't have the checkmark either.

comment:18 by pulkomandy, 8 years ago

Since hrev50997 it should be easy to add more fonts to the fallback set, we are not restricted to just one font anymore. I let you look at the commit, it should be rather obvious from there.

If we add it as fallback, then it will be a fallback for any font that is missing the glyph, so the problem will not be visible for other fonts anymore.

Note: See TracTickets for help on using tickets.