Re: Arrow on Windows

2019-04-29 Thread Arnaud de Montard via 4D_Tech


> Le 29 avr. 2019 à 09:59, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> [...]
> unicode give you plenty of choices:

Very true, unicode is our friend. As an example, a method I use to represent 
some keyboard keys. The link to wiki in comments is a french-but-interesting 
page. Dingbats are represented in unicode too:


++
  //UI_KeyboardGetChar (keyCode_l) -> code
  //$0 : unicode value of the char representing the wanted keyboard key
  //$1 : use 4D constant for the corresponding char
  //example : Char(UI_KeyboardGetChar (Tab key)) -> "⇥"
  //http://fr.wikipedia.org/wiki/Table_des_caractères_Unicode_(2000-2FFF)
  //© arnaud * 27/07/2012
C_LONGINT($0)
C_LONGINT($1)

C_LONGINT($in_l)
C_LONGINT($out_l)

If (False)
C_LONGINT(UI_KeyboardGetChar ;$0)
C_LONGINT(UI_KeyboardGetChar ;$1)
End if 
  //_
If (Count parameters<1)
$out_l:=Character code("¿")

Else 

$in_l:=$1
  //$char:=Caractère(UI_KeyboardGetChar (Tabulation))
Case of 

: ($in_l=Help key)
$out_l:=Character code("?")
: ($in_l=Escape key)
$out_l:=0x238B
  //$out_l:=0x241B  //esc in letters
: ($in_l=127)  //erase to the right
$out_l:=0x2326
: ($in_l=Backspace key)  //erase to the left
$out_l:=0x232B
: ($in_l=Return key)
$out_l:=0x21A9
  //$out_l:=0x23CE//alternate
: ($in_l=Enter key)
$out_l:=0x2305
: ($in_l=Tab key)
$out_l:=0x21E5
: ($in_l=Left arrow key)
$out_l:=0x2190
: ($in_l=Up arrow key)
$out_l:=0x2191
: ($in_l=Right arrow key)
$out_l:=0x2192
: ($in_l=Down arrow key)
$out_l:=0x2193
: ($in_l=Home key)
$out_l:=0x2196
: ($in_l=End key)
$out_l:=0x2198
: ($in_l=Page up key)
$out_l:=0x21DE
: ($in_l=Page down key)
$out_l:=0x21DF
Else 
$out_l:=Character code("¿")  //unknown
End case 
End if 

$0:=$out_l
  //_
++

-- 
Arnaud de Montard 






**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Arrow on Windows

2019-04-29 Thread Keisuke Miyako via 4D_Tech
choosing a font is so irrelevant

unicode give you plenty of choices:

←
⇦
⃖
⃪
⬅
⃖

etc.

> 2019/04/29 15:44、Jeremy Roussak via 4D_Tech <4d_tech@lists.4d.com>のメール:
>
>  Is there a font, which will reliably be present on users’ machines, which 
> has such a character? Or must I resort to a picture of some kind?




**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Arrow on Windows

2019-04-29 Thread Jeremy Roussak via 4D_Tech
I need a small button to contain an arrow pointing to the left. On my Mac, I 
can manage it easily (there’s a nice one in Wingdings 3), but my app also has 
to run under Windows. I know very little of Windows fonts. Is there a font, 
which will reliably be present on users’ machines, which has such a character? 
Or must I resort to a picture of some kind?

Thanks

Jeremy
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**