self icon indicating copy to clipboard operation
self copied to clipboard

What is privacy specification?

Open dram opened this issue 7 years ago • 18 comments

"3.2. Slot descriptors" in handbook says:

A slot descriptor consists of an optional privacy specification, followed by the slot name and an optional initializer.

But I can not find further description of "privacy specification", so what is it?

dram avatar Oct 12 '16 02:10 dram

It has no effect, its just for documentation. You can see it in the UI - specific public methods are bold for example. It isn't used consistently at the moment. It is one of the annotations you can make on objects or slots.

russellallen avatar Oct 12 '16 06:10 russellallen

Do you mean Visibility: public? I did not see any bold method names in Linux X11, is that macOS specific?

dram avatar Oct 12 '16 10:10 dram

If I define font alias for verdana, verdanaBold and verdanaItalic in X11Globals fontFamily, bold fonts can be displayed correctly.

I'd like to file those new slots out, I already set they to scalableFont module, but that module can not be found in All Modules list, then how can I file it out?

dram avatar Oct 12 '16 13:10 dram

Found it in "Changed Modules", and here's PR #73.

dram avatar Oct 12 '16 13:10 dram

What Linux are you on?

russellallen avatar Oct 12 '16 22:10 russellallen

I'm on Ubuntu 15.04 and don't see a difference in font between public and private slots. The patch in PR #73 has no visible effect either but it does stop the warning in the console about verdana not existing.

doublec avatar Oct 12 '16 22:10 doublec

I'm on Debian 8.

I double checked PR #73 and confirm that bold font can be shown in slot names. e.g. in shell object, help slot is shown in bold font.

dram avatar Oct 13 '16 01:10 dram

Odd, maybe I don't have the required fonts. Here's a screenshot:

selffonts

doublec avatar Oct 13 '16 01:10 doublec

Linux fonts have been a pain point for a while. We're using the oldest font handling part of X11 and the available fonts are not just limited but vary from distro to distro.

russellallen avatar Oct 13 '16 01:10 russellallen

Yes, a solution might be to continue on https://bluishcoder.co.nz/2015/01/08/improving-linux-font-support-in-self.html

doublec avatar Oct 13 '16 01:10 doublec

self shell

Here is my screenshot, pay attention to help slot and buttons on top right.

dram avatar Oct 13 '16 02:10 dram

Hi @doublec, when looking more closely to your screenshot, I found that all texts seem to be displayed with fixed font.

Could you install xfonts-75dpi and xfonts-100dpi and try again? Those two package contains helvetica font.

dram avatar Oct 13 '16 04:10 dram

Could you install xfonts-75dpi and xfonts-100dpi and try again? Those two package contains helvetica font.

I've installed the packages, but I don't see the help in bold. But all other fonts are now super weird.

Before:

snimek obrazovky-nepojmenovane okno

After:

screenshot at 2016-10-14 04 31 00

Bystroushaak avatar Oct 14 '16 02:10 Bystroushaak

I would say displaying all UI texts in monospace font is also a bit unusual.

helvetica will look better if in larger size. Following screenshot is run with following configuration:

selfCatOrObjModel moduleSummaryFontSpec size: 16.
selfGeneralSlotModel undeclaredTitleFontSpec size: 14.
selfGeneralSlotModel privateTitleFontSpec size: 14.
selfGeneralSlotModel publicTitleFontSpec size: 14.
generalCategoryModel objectTitleFontSpec size: 16.
generalCategoryModel objectTitleFontSpec style: 'bold'.
generalCategoryModel subcategoryTitleFontSpec size: 14.
ui2_textField fontSpec: globals fontSpec copyName: '9x15bold' Size: 15.
ui2Menu defaultFontSpec: ui2Menu defaultFontSpec copySize: 16.

snapshot2

dram avatar Oct 15 '16 01:10 dram

BTW, @Bystroushaak, did you apply changes in PR #73? It is needed to show bold font slot names.

dram avatar Oct 15 '16 02:10 dram

I would say displaying all UI texts in monospace font is also a bit unusual.

That is the default configuration, I didn't change anything on my system.

BTW, @Bystroushaak, did you apply changes in PR #73? It is needed to show bold font slot names.

Ah, now I get it. I will try that later.

Bystroushaak avatar Oct 15 '16 13:10 Bystroushaak

@Bystroushaak, read screenshots in handbook more closely, you will find that monospace font was not used so heavily there.

http://handbook.selflanguage.org/4.5/howtoprg.html

dram avatar Oct 15 '16 21:10 dram

With further investigation, I found that changes in #73 is not needed. To show bold slot names, run following code (make sure that you have fonts times installed):

selfGeneralSlotModel publicTitleFontSpec name: 'helvetica'.

dram avatar Oct 16 '16 06:10 dram