issue-#64 Wingdings dependency in StdLinks

User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

issue-#64 Wingdings dependency in StdLinks

Post by Josef Templ »

I have created issue-#64 which addresses the Wingdings dependency of StdLinks.
This module is the only one now that depends on a special Windows font, which is not
available under all Windows versions and Wine.
For the issue see http://redmine.blackboxframework.org/issues/64.

It is not clear to me how a perfect solution would look like.

One possibility would be to eliminate Wingdings at all and use
character based symbols such as => and <= for links, for example.
This would have the advantage of avoiding Wingdings and avoiding the need to
do a language mapping for the default appearance. It would also have a bracketing look.
In summary, it would be platform and language independent and very simple to do.
The disadvantage is that it changes the appearance of link and target elems.
However, since such elems are used by developers only, it would most probably not be
noticed by end-users of BB based applications.

The solution in CPC 1.7 rc6 still uses Wingdings but prepends the byte 0F0X to the
Wingdings character codes. This seems to work for russian Windows and also for
standard Windows but it actually refers to user defined characters in Unicode.
So we cannot be sure that this will work forever and it certainly does not work
in my Windows XP installation, which does not have Wingdings installed at all.
It is still platform specific and the default appearance would need a language mapping
for the link and target texts.

- Josef
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#64 Wingdings dependency in StdLinks

Post by Zinn »

Every Windings character can translated to an Unicode character.
It is possible to leave the font Wingdings and use the font Segoe UI Symbol instead.
This font is available since Vista.
Should I work further on this solution?
In my Ubuntu Wine I have the font Segoe UI Symbols too.
Normal text is also readable with this font.
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#64 Wingdings dependency in StdLinks

Post by Josef Templ »

My impression is that these fonts all live in a grey zone.
One can never be sure that they are available on a particular platform, how
they look like, what the encoding is, and what will happen in the future.
Also the BB1.6 Target symbols are not very intuitive and lack a bracketing structure
(i.e. no symmetry between opening and closing symbols).

The special glyphs don't provide any objective advantage but create objective problems.
So I would actually prefer to eliminate them. Note that this is the last place
in BB where special fonts are still used (as far as I know). It would be a significant cleanup if we
could avoid this last font dependency. We would thereby avoid any font issues in the future.

For the Link symbols I would use: =>...<=
For the Target symbols I would use: >>...<<

The link symbols thereby have a certain degree of similarity with the special glyphs used so far.
The target symbols thereby have a certain degree of visual connection to the link symbols via the
usage of > and <. Both pairs of symbols have a bracketing look, i.e. they are symmetric.

The default behavior so far was: Link...~ and Target...~.
Really ugly but even this has been accepted by XP users like me.
For a long time I didn't even know that there are special symbols available
on other platforms.

There is one very special problem involved with changing the width of the symbols
for existing texts. This problem already existed in BB 1.6 and is the following:
The size (w, h) of a view is stored in the text document and when the text is opened
on a platform with different (w, h) then the view's size is not updated in all cases.
Depending on how the text is opened, sometimes it is adapted but in most cases it is not.

- Josef
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#64 Wingdings dependency in StdLinks

Post by Robert »

I agree with most of the above - avoiding Wingdings seems a good idea.

Actually I have always had the special symbols in NT & XP; I didn't know about the ugly defaults until I looked at the code a couple of days ago.
(I thought the (first) Target symbol was quite clever.)

I wrote, for my own use, but I think they are published as Casket\Mod\References on the Cpc site, some Link & Target Views for numbering equations in Documents.

They use the symbols ←"Eqn Id"→ & ►"Eqn Id"◄ for the link and target respectively (and differently coloured backgrounds!). They indicate that you leave a link, and arrive at a target.

These are Unicode symbols 2190, 2192, 25BA & 25C4. I prefer them to your compound suggestions.
User avatar
DGDanforth
Posts: 1061
Joined: Tue Sep 17, 2013 1:16 am
Location: Palo Alto, California, USA
Contact:

Re: issue-#64 Wingdings dependency in StdLinks

Post by DGDanforth »

Robert wrote:I agree with most of the above - avoiding Wingdings seems a good idea.

Actually I have always had the special symbols in NT & XP; I didn't know about the ugly defaults until I looked at the code a couple of days ago.
(I thought the (first) Target symbol was quite clever.)

I wrote, for my own use, but I think they are published as Casket\Mod\References on the Cpc site, some Link & Target Views for numbering equations in Documents.

They use the symbols ←"Eqn Id"→ & ►"Eqn Id"◄ for the link and target respectively (and differently coloured backgrounds!). They indicate that you leave a link, and arrive at a target.

These are Unicode symbols 2190, 2192, 25BA & 25C4. I prefer them to your compound suggestions.
Is there any possible confusion of these single characters with their other possible use?
-Doug
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#64 Wingdings dependency in StdLinks

Post by Zinn »

I wrote a little test program to show Unicode symbols.
Which Unicode symbol do you prefer? I would like to know .
We should also add Josef's successions about the default symbols .

Code: Select all

StdCoder.Decode ..,, ..VG,...3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
 hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLLCJuyKtYcZRiX
 7.2.s,c7d.,k,5TWyql.bnayKmKKqGomC5XzET1.PuP.MHT9N9ntumaU2,CJuyKtQC98P9PP7O
 NbXmb.2.YiHk2EqC,,6.,U08J99SdfJHPNjvQCJuGKfaqmY6MwdONl1QCh0708T,U..w.oWHU.
 2U18J99SqorGqmQCbWBxhYFWUl1UnNHEWUmr.6.2YFk5EA4,,6.,.hM.cU.ktAcoZimBhWhioh
 gnZcZRCY.2.Q42U.EBU.U,U.I3VuI3.0E65.o46.6I1w24Hg9U0CyHZiYReoBgh3inpZHFf.k,
 U.kTU.kGU.IU0swBSNfS2M6pt0eG,MRxdCvN166pt0Sz0k22.,6.MOrt.4HgV2hgqRcjhhhBgi
 ZgZJinpZHZC.2UlbcZpC.c9h0E.8D6..E1U.M3shTUzjdDZcJZd33YIhgnZiLBhixgYBhixgnJ
 aJphdRgjZgZRbBgV72Ze2YBAVhgZU2dZZhhhio3YOBhiphUgZUIUBAVhgZBAVhgZUIUUYeZRC.
 .UiYddRioheiBhXVBAVeAZBgV7AdB3eDJeI3Y4xhiZinZZU2ejJioRig6J99Sdnk0LsKKtCLK0
 GeUjFqYZU.ZORNPNZvQ.h0b99,dJHPNQbBgV7QcDpdHZeBAV7ogjpho3aUgbUIYLBhixAEFin4
 ak2O44HEqHE8mVyK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REn..Y7..U4,ga0xa6BZvg,...g6.5OAFO
 8r,B1.Ea...O2kMGINW2...kW.6AFO8g,..,,UH,.QgjZhgBgkRiZJbUQZy2YioZUYbfIYdQbU
 .EaM1...EQWIK00jNCd7GHtCa....SHYmGE01OHYa0oA..N0..EQ.fdEh7GHtC...Ur.Qck2dd
 Q5oA..N0..EQ.jNEX7GHtC...Ur.8Yp2ddQ5oA.U3VAVJ,Q5PMFR8FGpmC5.I4.RN13QwdONQc
 jphoJijZhghgmRCbW1ZimZh2hgnRg.AyI7S..RtETfPd16FCrl0U1VV,.Z1...bf9.EWE.8T0E
 .E8E.k2E.0..4E,5TeEdYBCLLC3ZORNX2V.AyI,ktuGdU2V.Iy1.,Uf8.S.C80E.QE.sQRtIQ8
 n9P99F9vQ59.X5.u0n9PU.Iy56.2.U6UO,,U00.umUG56RY62.7.,..Y22U,2.,E.EECOhU.Aq
 XD.zwPA.A.2U.E,9z4U...p.0.4.I3l6w1.0E65.2..N6yY,YZPS9L6y0I,5TWyaphBQC5uP..
 Q06..E2E.U76.2kLRClt45J.nT32kwL,,sKFHQvFA,Cs1...
 --- end of encoding ---
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: issue-#64 Wingdings dependency in StdLinks

Post by Josef Templ »

This is how it would look like with the new default behavior.
The link and target elems stand out by the light grey background.
Any complications are avoided for all times and on all platforms.
For me this would be good enough and it simplifies StdLinks considerably.

> They use the symbols ←"Eqn Id"→ & ►"Eqn Id"◄ for the link and target respectively (and differently coloured backgrounds!). They indicate that you leave a link, and arrive at a target.
The arrows are almost invisible and the targets stand out too much compared to the links. This is not a well-balanced design from a typographical point of view.
We also don't know if such glyphs are available under all Wine versions because there exist fonts that contain only a subset of all Unicode characters.

- Josef
Attachments
StdLinks_JT.jpg
StdLinks_JT.jpg (25.25 KiB) Viewed 11059 times
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#64 Wingdings dependency in StdLinks

Post by Zinn »

I decide to translate the Wingding symbols (left side) to the following Unicode characters (right side).
I don't understand why the Unicode symbol shows almost correctly even the font can't display this symbol
after copy them here to the website.

Link: => ... <=
246 [00F6] ö  8594 [2192] → → → → → → →
245 [00F5] õ  8592 [2190] ← ← ← ← ← ← ←

Target: >> ... <<
164 [00A4] ¤  9673 [25C9] ◉ ◉ ◉ ◉ ◉ ◉ ◉
161 [00A1] ¡  9675 [25CB] ○ ○ ○ ○ ○ ○ ○

Fold expand: -> ... <-
240 [00F0] ð  8680 [21E8] ⇨ ⇨ ⇨ ⇨ ⇨ ⇨ ⇨
239 [00EF] ï  8678 [21E6] ⇦ ⇦ ⇦ ⇦ ⇦ ⇦ ⇦

Fold collapse: +> .. <+
232 [00E8] è  9193 [23E9] ⏩ ⏩ ⏩ ⏩ ⏩ ⏩ ⏩
231 [00E7] ç  9194 [23EA] ⏪ ⏪ ⏪ ⏪ ⏪ ⏪ ⏪
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Re: issue-#64 Wingdings dependency in StdLinks

Post by Robert »

Helmut, What system are you using?

On my XP system the codes 2190 & 2192 agree with your post, but the other codes look completely different,. For example 21E8 is the partial derivative symbol.

I think the current Wingdings symbols look better than any of the other suggestions, but agree that the current defaults are poor. The current code to test for Wingdings looks reasonably simple. What is the problem with keeping it; does it not work on some systems?


Update: 21E8 is the partial derivative symbol in Arial, it is the hollow right arrow in Lucinda Sans Unicode. ???!

Update 2: Your BlackBox test program seems to give different results to the Windows Character Map tool. I am now even more confused. Sticking to a few simple ACCII characters does seem like a good idea.
Zinn
Posts: 476
Joined: Tue Mar 25, 2014 5:56 pm
Location: Frankfurt am Main
Contact:

Re: issue-#64 Wingdings dependency in StdLinks

Post by Zinn »

A lot of fonts can't display all Unicode characters.
Currently I found one font which can display most of the Unicode symbols.
Only the font "Segoe UI Symbol" can display all symbols which we need here.
This font works on my Ubuntu system and on my Windows 8 system
Wingdings does not work on my Ubuntu system.
With my last decision we don't need to ask for the platform in StdLinks.

Code: Select all

	PROCEDURE InitIcons;
		VAR font: Fonts.Font; d: StdDirectory;

		PROCEDURE DefaultAppearance;
		BEGIN font := Fonts.dir.Default(); iconFont := font.typeface;
			linkLeft := "=>"; linkRight := "<=";
			targetLeft := ">>"; targetRight :=  "<<";
			coloredBackg := TRUE
		END DefaultAppearance;

	BEGIN
		NEW(d); dir := d; stdDir := d;
		iconFont := "Segoe UI Symbol";
		font := Fonts.dir.This(iconFont, 10*Fonts.point (*arbitrary*), {}, Fonts.normal);
		IF font.IsAlien() THEN DefaultAppearance
		ELSE
			linkLeft[0] := 02192X; linkLeft[1] := 0X; linkRight[0] := 02190X; linkRight[1] := 0X;  (* "→" "←" *)
			targetLeft[0] := 025C9X; targetLeft[1] := 0X; targetRight[0] := 025CBX; targetRight[1] := 0X; (* "◉" "○" *)
			coloredBackg := FALSE
		END;
		NEW(cleaner);
		dialog.close.SetResources("#Std:links")
	END InitIcons;
Post Reply