IMEime wrote: ↑05 Feb 2019, 04:45
How about this ? It is just several seconds idea.
Code: Select all
myUniCode := 0x263E
myCharacter := Chr(myUniCode)
myCode := Asc(myCharacter)
SetFormat, IntegerFast, H
MsgBox % myUniCode = myCode ? "O" : "X"
^ It appears to work correctly on ahk 1.1 for some characters, but not others (shows O when not supported).
Came up with this, similar problem
Code: Select all
hDC := DllCall("GetDC", "Uint", 0) ;handle to device context of entire screen
lpstr := Chr(0x1F326) ;character for WHITE SUN BEHIND CLOUD WITH RAIN
varsetcapacity(pgi, 2) ;array of glyph indices corresponding to the characters in lpstr
c := 2 ;length of both the length of the string pointed to by lpstr and the size (in WORDs) of pgi. Not sure if that means "add their sizes together"
fl := 1 ;GGI_MARK_NONEXISTING_GLYPHS; marks unsupported glyphs with the hexadecimal value 0xffff
r := DllCall("GetGlyphIndicesA" ;https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-getglyphindicesa
, "Uint", hDC
, "Ptr" , &lpstr
, "Uint" , c
, "Uint" , &pgi
, "Uint" , fl )
msgbox % "`nlpstr: " . lpstr . " <- if empty square, pgi should be 65535"
. "`npgi: " . NumGet(pgi, 0, "uint")
. "`nresult: " . r
I'm probably doing something wrong though.