MacOS: Fixed rendering of apple chars in italic, removed Insert key from mac menu (gets displayed wrongly)

This commit is contained in:
Mirek Fidler 2023-04-18 11:12:11 +02:00
parent f8b2b06938
commit 36ef12fdc3
11 changed files with 235 additions and 12 deletions

View file

@ -22,6 +22,7 @@ struct App : TopWindow {
virtual void Activate()
{
Log("Activate");
SetFocus();
}
virtual void Deactivate()

View file

@ -74,7 +74,7 @@ String ReadFontTable(Stream& in, const char *table, int fonti = 0)
}
return Null;
}
/*
struct MyApp : TopWindow {
void Paint(Draw& w) {
String text;
@ -88,7 +88,7 @@ struct MyApp : TopWindow {
int x = 10;
Font fnt(Font::FindFaceNameIndex("Noto Color Emoji"), 20);
FontTypeReader r;
r.Open(font);
r.Open(fnt);
for(auto r : r.ranges) {
for(int c = r.a; c <= r.b; c++) {
w.DrawText(x, y, WString(c, 1), fnt);
@ -105,6 +105,7 @@ struct MyApp : TopWindow {
GUI_APP_MAIN {
MyApp().Sizeable().Zoomable().Run();
}
*/
GUI_APP_MAIN
{
@ -116,7 +117,7 @@ GUI_APP_MAIN
DDUMPHEX(ReadFontTable(in, "cmap", 2));
return;
*/
#if 1
#if 0
/* for(int i = 0; i < Font::GetFaceCount(); i++)
DDUMP(Font::GetFaceName(i));
return;*/

View file

@ -215,14 +215,14 @@ struct MMImp {
Upp::dword k = e.keyCode;
WString x = ToWString((CFStringRef)(e.charactersIgnoringModifiers));
if(x.GetCount() == 1)
#define KEY(x) case #x[0]: k = kVK_ANSI_##x; break;
switch(ToUpper(x[0])) {
#define KEY(c) case #c[0]: k = kVK_ANSI_##c; break;
KEY(A); KEY(B); KEY(C); KEY(D); KEY(E); KEY(F); KEY(G); KEY(H); KEY(I); KEY(J);
KEY(K); KEY(L); KEY(M); KEY(N); KEY(O); KEY(P); KEY(Q); KEY(R); KEY(S); KEY(T);
KEY(U); KEY(V); KEY(W); KEY(X); KEY(Y); KEY(Z);
}
#undef KEY
k = decode(k, kVK_ANSI_KeypadEnter, K_ENTER, kVK_Tab, K_TAB, K_DELTA|k)|up;
if(GetCtrl())

View file

@ -11,7 +11,7 @@
{ K_UP, NSUpArrowFunctionKey },
{ K_RIGHT, NSRightArrowFunctionKey },
{ K_DOWN, NSDownArrowFunctionKey },
{ K_INSERT, NSInsertFunctionKey },
// { K_INSERT, NSInsertFunctionKey }, // displayed as ? in a box in the menu - we do not want that
{ K_DELETE, NSDeleteFunctionKey },
{ K_F1, NSF1FunctionKey },
{ K_F2, NSF2FunctionKey },

View file

@ -350,6 +350,12 @@ int PanoseDistance(byte *a, byte *b)
bool Replace(Font fnt, int chr, Font& rfnt)
{
#ifdef PLATFORM_COCOA
static WString apple_kbd = "⌘⌃⇧⌥"; // these need special handling on macos to look nice
if(apple_kbd.Find(chr) >= 0)
fnt.Face(Font::SANSSERIF); // otherwise devangari font is used, which looks off
#endif
bool prefer_color = PreferColorEmoji(chr);
static VectorMap<int, sRFace *> rface[2]; // face index to font info
static Vector<int> color[2]; // colorimg faces
@ -430,7 +436,11 @@ bool Replace(Font fnt, int chr, Font& rfnt)
static WString apple_kbd = "⌘⌃⇧⌥"; // do not make these smaller it looks ugly...
LLOG("Original font: " << fnt << " " << fnt.GetAscent() << " " << f.GetDescent() <<
", replacement " << f << " " << f.GetAscent() << " " << f.GetDescent());
if((f.GetAscent() > a || f.GetDescent() > d) && apple_kbd.Find(chr) < 0) {
if((f.GetAscent() > a || f.GetDescent() > d)
#ifdef PLATFORM_COCOA
&& apple_kbd.Find(chr) < 0
#endif
) {
static sFontMetricsReplacement cache[256];
int q = CombineHash(fnt, f) & 255;
if(cache[q].src != fnt || cache[q].dst != f) {

View file

@ -127,6 +127,183 @@
{ "padmaa-Bold.1.1", { 2,0,8,0,4,0,0,0,0,0 }, { 0xf6100000,0x82000000,0x00000084,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
#endif
#if defined(PLATFORM_POSIX) && defined(PLATFORM_COCOA)
{ "Academy Engraved LET", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfffe1000,0x06000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Al Bayan", { 0,0,0,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Al Nile", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Al Tarikh", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "American Typewriter", { 2,9,6,4,2,0,4,2,3,4 }, { 0xfffff000,0x07000000,0x0000008c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Andale Mono", { 2,11,5,9,0,0,0,0,0,4 }, { 0xff17e000,0x07000000,0x0000002c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Apple Braille", { 5,0,0,0,0,0,0,0,0,0 }, { 0x80000000,0x00800000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Apple Chancery", { 3,2,7,2,4,5,6,6,5,4 }, { 0xff9b0000,0x03000000,0x0000002c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Apple Color Emoji", { 0,0,0,0,0,0,0,0,0,0 }, { 0xa0000000,0x03a00000,0x00000004,0x00000000,0x00000038,0x00000000,0x00000000,0x00000001 } },
{ "Apple SD Gothic Neo", { 2,0,3,0,0,0,0,0,0,0 }, { 0xfdbfd000,0x27e07fff,0xfc7ff00c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Apple Symbols", { 2,0,0,0,0,0,0,0,0,0 }, { 0xf23f0000,0x17c04000,0x01000007,0x00000000,0x00003030,0x00000000,0x00000000,0x00000000 } },
{ "Arial", { 2,11,6,4,2,2,2,2,2,4 }, { 0xfffffbf4,0x07400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Black", { 2,11,10,4,2,1,2,2,2,4 }, { 0xff97e000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Hebrew", { 0,0,0,0,0,0,0,0,0,0 }, { 0xe0040300,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Hebrew Scholar", { 0,0,0,0,0,0,0,0,0,0 }, { 0xe0040300,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Narrow", { 2,11,6,6,2,2,2,3,2,4 }, { 0xff97e000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Rounded MT Bold", { 2,15,7,4,3,5,4,3,2,4 }, { 0xfe110000,0x03000000,0x00000024,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Arial Unicode MS", { 2,11,6,4,2,2,2,2,2,4 }, { 0xfffffff0,0xe7207fff,0xfc7ff0bc,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Avenir", { 2,0,5,3,2,0,0,2,0,3 }, { 0xfe930000,0x03000000,0x0000020c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Avenir Next", { 2,11,8,3,2,2,2,2,2,4 }, { 0xffbff000,0x07000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Avenir Next Condensed", { 2,11,8,6,2,2,2,2,2,4 }, { 0xfe970000,0x03000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Ayuthaya", { 0,0,4,0,0,0,0,0,0,0 }, { 0xffdff000,0x47000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Baghdad", { 1,0,5,0,0,0,0,2,0,4 }, { 0xf00000f0,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bangla MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bangla Sangam MN", { 2,0,0,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Baskerville", { 2,2,5,2,7,4,1,2,3,3 }, { 0xfffff000,0x07400000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Beirut", { 0,0,6,0,0,0,0,0,0,0 }, { 0xf00000f0,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Big Caslon", { 2,0,6,3,9,0,0,2,0,3 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bodoni 72", { 0,0,4,0,0,0,0,0,0,0 }, { 0xffff1000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bodoni 72 Oldstyle", { 0,0,4,0,0,0,0,0,0,0 }, { 0xfe130000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bodoni 72 Smallcaps", { 0,0,4,0,0,0,0,0,0,0 }, { 0xfe130000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bodoni Ornaments", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf0030000,0x02000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Bradley Hand", { 0,0,7,0,0,0,0,0,0,0 }, { 0xfffff800,0x07400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Brush Script MT", { 3,6,8,2,4,4,6,7,3,4 }, { 0xfffff000,0x07000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Chalkboard", { 3,5,6,2,4,2,2,2,2,5 }, { 0xff9f1000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Chalkboard SE", { 3,5,6,2,4,2,2,2,2,5 }, { 0xfffff000,0x27200000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Chalkduster", { 3,5,6,2,4,2,2,2,2,5 }, { 0xffbf1000,0x27200000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Charter", { 2,4,5,3,5,5,6,2,2,3 }, { 0xfffff800,0x07400000,0x0100003c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Cochin", { 2,0,6,3,2,0,0,2,0,3 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Comic Sans MS", { 3,15,7,2,3,3,2,2,2,4 }, { 0xff97e000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Copperplate", { 2,0,5,4,0,0,0,2,0,4 }, { 0xffbff800,0x07400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Corsiva Hebrew", { 0,0,0,0,0,0,0,0,0,0 }, { 0xe0040300,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Courier New", { 2,7,3,9,2,2,5,2,4,4 }, { 0xfffffbf4,0x07400000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "DIN Alternate", { 2,11,5,0,0,0,0,0,0,0 }, { 0xffbff800,0x06000000,0x00000024,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "DIN Condensed", { 0,0,5,0,0,0,0,0,0,0 }, { 0xfffff800,0x07400000,0x0100021c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Damascus", { 0,0,4,0,0,0,0,0,0,0 }, { 0xa00000f4,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "DecoType Naskh", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Devanagari MT", { 2,0,5,0,2,0,0,0,0,0 }, { 0xd0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Devanagari Sangam MN", { 2,0,0,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Didot", { 2,0,5,3,0,0,0,2,0,3 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Diwan Kufi", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Diwan Thuluth", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000c0,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Euphemia UCAS", { 2,11,5,3,4,1,2,2,1,4 }, { 0xfe180000,0x12000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Farah", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Farisi", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000c0,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Futura", { 2,11,6,2,2,2,4,2,3,3 }, { 0xfebb0000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "GB18030 Bitmap", { 2,1,6,1,4,1,1,1,1,1 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Galvji", { 2,11,5,4,2,2,2,2,2,4 }, { 0xfe1f0000,0x27000000,0x0080000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Geeza Pro", { 2,0,4,0,0,0,0,0,0,0 }, { 0xa00000f4,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Geneva", { 2,11,5,3,3,4,4,4,2,4 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Georgia", { 2,4,5,2,5,4,5,2,3,3 }, { 0xfffff000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gill Sans", { 2,11,5,2,2,1,4,2,2,3 }, { 0xfe18f000,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Grantha Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xfe9f0000,0x87000000,0x00000008,0x24000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gujarati MT", { 0,0,5,0,7,0,0,0,0,0 }, { 0xf0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gujarati Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gurmukhi MN", { 2,2,6,0,5,4,5,2,3,4 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gurmukhi MT", { 0,0,0,0,0,0,0,0,0,0 }, { 0xd0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Gurmukhi Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Heiti SC", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfffff000,0x0f7fffff,0xff00018c,0x00000000,0x00000003,0xffffffff,0xff000008,0x00000000 } },
{ "Heiti TC", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfffff000,0x0f7fffff,0xff00018c,0x00000000,0x00000003,0xffffffff,0xff000008,0x00000000 } },
{ "Helvetica", { 0,0,0,0,0,0,0,0,0,0 }, { 0xfffff800,0x67400000,0x0100001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Helvetica Neue", { 2,0,5,3,0,0,0,2,0,4 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Herculanum", { 2,0,5,5,0,0,0,2,0,4 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Hiragino Maru Gothic ProN", { 2,15,4,0,0,0,0,0,0,0 }, { 0xff7fc000,0x07ffffff,0xfc00000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Hiragino Mincho ProN", { 2,2,3,0,0,0,0,0,0,0 }, { 0xffffc000,0x47ffffff,0xfd80000c,0x00000000,0x00000023,0xffffffff,0xff981308,0x00000000 } },
{ "Hiragino Sans", { 2,11,3,0,0,0,0,0,0,0 }, { 0xffffc000,0x47ffffff,0xfd80000c,0x00000000,0x00000023,0xffffffff,0xff981308,0x00000000 } },
{ "Hiragino Sans GB", { 2,11,3,0,0,0,0,0,0,0 }, { 0xfd53c000,0x077fffff,0xfc00018c,0x00000000,0x00000003,0x90820000,0x00000000,0x00000000 } },
{ "Hoefler Text", { 2,3,6,2,5,5,6,2,2,3 }, { 0xffdbf000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "ITF Devanagari", { 2,0,0,0,0,0,0,0,0,0 }, { 0xf0200000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "ITF Devanagari Marathi", { 2,0,0,0,0,0,0,0,0,0 }, { 0xf0200000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Impact", { 2,11,8,6,3,9,2,5,2,4 }, { 0xff97e000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "InaiMathi", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0340000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kailasa", { 2,0,5,0,0,0,0,2,0,4 }, { 0xa0000000,0x40000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kannada MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kannada Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kefa", { 2,0,5,6,0,0,0,2,0,4 }, { 0xfe130000,0x23400000,0x0080000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Khmer MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x1b000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Khmer Sangam MN", { 2,0,4,0,0,0,0,0,0,0 }, { 0xe0000000,0x1b000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kohinoor Bangla", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfeb10000,0x87000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kohinoor Devanagari", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfeb10000,0x87000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kohinoor Gujarati", { 0,0,8,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kohinoor Telugu", { 2,0,0,0,0,0,0,0,0,0 }, { 0xfe910000,0xc7000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Kokonor", { 1,0,5,0,0,0,0,2,0,3 }, { 0x80000000,0x43000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Krungthep", { 2,0,4,0,0,0,0,0,0,0 }, { 0xffdf1000,0x47000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "KufiStandardGK", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Lao MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Lao Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Lucida Grande", { 2,11,6,0,4,5,2,2,2,4 }, { 0xfffffb00,0x07800000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Luminari", { 2,0,5,5,0,0,0,2,0,4 }, { 0xffbff000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Malayalam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Malayalam Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Marker Felt", { 2,0,4,0,0,0,0,0,0,0 }, { 0xfffbf000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Menlo", { 2,11,6,9,3,8,4,2,2,4 }, { 0xfffff800,0x27c00000,0x0100001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Microsoft Sans Serif", { 2,11,6,4,2,2,2,2,2,4 }, { 0xfffffbf4,0x47400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Mishafi", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000c0,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Mishafi Gold", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x00000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Monaco", { 0,0,0,0,0,0,0,0,0,0 }, { 0xfffff000,0x07000000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Mshtakan", { 2,0,4,0,0,0,0,0,0,0 }, { 0xf2000e00,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Mukta Mahee", { 2,11,0,0,0,0,0,0,0,0 }, { 0xff910000,0x87000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Muna", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Myanmar MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x23000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Myanmar Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x23000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Nadeem", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "New Peninim MT", { 0,0,0,0,0,0,0,0,0,0 }, { 0xe0040300,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noteworthy", { 2,0,4,0,0,0,0,0,0,0 }, { 0xfffff000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noto Nastaliq Urdu", { 2,11,5,2,4,5,4,2,2,4 }, { 0xf00000f4,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noto Sans Kannada", { 2,11,10,2,4,5,4,2,2,4 }, { 0xf0000000,0xc7000000,0x00800004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noto Sans Myanmar", { 2,11,10,2,4,5,4,2,2,4 }, { 0xa0000000,0x23000000,0x00800004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noto Sans Oriya", { 2,11,5,2,4,5,4,2,2,4 }, { 0xf0000000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Noto Serif Myanmar", { 2,2,10,2,6,5,5,2,2,4 }, { 0xa0000000,0x23000000,0x00800004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Optima", { 2,0,5,3,6,0,0,2,0,4 }, { 0xfe180000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Oriya MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Oriya Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Mono", { 2,6,7,9,2,2,5,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Sans", { 2,11,5,3,2,2,3,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Sans Caption", { 2,11,5,3,2,2,3,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Sans Narrow", { 2,11,5,3,2,2,3,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Serif", { 2,10,6,3,4,5,5,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PT Serif Caption", { 2,6,6,3,5,5,5,2,2,4 }, { 0xffbbf800,0x07400000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Palatino", { 0,0,0,0,0,0,0,0,0,0 }, { 0xfffff000,0x27200000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Papyrus", { 2,11,6,2,4,2,0,2,3,3 }, { 0xffff1000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Party LET", { 0,0,0,0,0,0,0,0,0,0 }, { 0xffbe1000,0x06000000,0x0000002c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Phosphate", { 2,0,5,6,5,0,0,2,0,4 }, { 0xfffff000,0x07000000,0x0000002c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "PingFang HK", { 2,11,4,0,0,0,0,0,0,0 }, { 0xffffc000,0x07ffffff,0xfc00000c,0x00000000,0x00000023,0xffffffff,0xffffff88,0x00000000 } },
{ "PingFang SC", { 2,11,4,0,0,0,0,0,0,0 }, { 0xffffc000,0x07ffffff,0xfc00000c,0x00000000,0x00000023,0xffffffff,0xffffff88,0x00000000 } },
{ "PingFang TC", { 2,11,4,0,0,0,0,0,0,0 }, { 0xffffc000,0x07ffffff,0xfc00000c,0x00000000,0x00000023,0xffffffff,0xffffff88,0x00000000 } },
{ "Plantagenet Cherokee", { 2,2,0,0,0,0,0,0,0,0 }, { 0xf61c0000,0x22000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Raanana", { 0,0,0,0,0,0,0,0,0,0 }, { 0xe0040300,0x02000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Rockwell", { 2,6,5,3,2,2,5,2,4,3 }, { 0xffffea80,0xd6000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "STDFONT", { 0,0,0,0,0,0,0,0,0,0 }, { 0xfffff800,0x67400000,0x0100001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "STIX Two Math", { 2,2,6,3,5,4,5,2,3,4 }, { 0xffffe000,0x07a00000,0x0100020c,0x00000000,0x00001040,0x00000000,0x00000000,0x00000000 } },
{ "STIX Two Text", { 0,0,0,0,0,0,0,0,0,0 }, { 0xffffe000,0x07000000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "STSong", { 2,1,8,0,4,1,1,1,1,1 }, { 0xfd53c000,0x07207fff,0xfc000184,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Sana", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000f0,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Sathu", { 0,0,4,0,0,0,0,0,0,0 }, { 0xfffff000,0x47000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Savoye LET", { 0,0,0,0,0,0,0,0,0,0 }, { 0xfffff800,0x06800000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Shree Devanagari 714", { 2,0,6,0,0,0,0,0,0,0 }, { 0xf6100000,0x83000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "SignPainter", { 2,0,0,6,7,0,0,2,0,4 }, { 0xff9bf800,0x07000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Silom", { 0,0,4,0,0,0,0,0,0,0 }, { 0xffdf1000,0x47000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Sinhala MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Sinhala Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Skia", { 2,13,5,2,2,2,4,2,2,4 }, { 0xff9b0000,0x03000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Snell Roundhand", { 2,0,6,3,8,0,0,9,0,4 }, { 0xfffff800,0x26e00000,0x0100001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Songti SC", { 2,1,8,0,4,1,1,1,1,1 }, { 0xfd53c000,0x07207fff,0xfc000184,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Songti TC", { 2,1,8,0,4,1,1,1,1,1 }, { 0xfd53c000,0x07207fff,0xfc000184,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Sukhumvit Set", { 2,0,5,6,0,0,0,2,0,4 }, { 0xfe130000,0x43000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Symbol", { 0,0,0,0,0,0,0,0,0,0 }, { 0xf22b0000,0x03200000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Tahoma", { 2,11,6,4,3,5,4,4,2,4 }, { 0xfffffbf4,0x47400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Tamil MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x83000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Tamil Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xfe9f0000,0x87000000,0x00000008,0x24000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Telugu MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Telugu Sangam MN", { 0,0,5,0,0,0,0,0,0,0 }, { 0xe0000000,0x43000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Thonburi", { 0,0,4,0,0,0,0,0,0,0 }, { 0xfffff000,0x47000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Times New Roman", { 2,2,6,3,5,4,5,2,3,4 }, { 0xfffffbf4,0x07400000,0x0100000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Trattatello", { 2,15,4,3,2,2,0,2,3,3 }, { 0xffbff000,0x07000000,0x0000001c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Trebuchet MS", { 2,11,6,3,2,2,2,2,2,4 }, { 0xff97e000,0x07000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Verdana", { 2,11,6,4,3,5,4,4,2,4 }, { 0xffdff600,0x47000000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Waseem", { 0,0,4,0,0,0,0,0,0,0 }, { 0xf00000c0,0x00000000,0x00000004,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Webdings", { 5,3,1,2,1,5,9,6,7,3 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Wingdings", { 5,0,0,0,0,0,0,0,0,0 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Wingdings 2", { 5,2,1,2,1,5,7,7,7,7 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Wingdings 3", { 5,4,1,2,1,8,7,7,7,7 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Zapf Dingbats", { 5,2,1,2,1,7,4,2,6,9 }, { 0xc0000000,0x03200000,0x0000000c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Zapfino", { 3,3,3,0,4,7,7,7,12,3 }, { 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
#endif
#ifdef PLATFORM_WIN32
{ "Alef", { 0,0,5,0,0,0,0,0,0,0 }, { 0xfc900300,0x06000000,0x0000020c,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 } },
{ "Amiri", { 0,0,5,0,0,0,0,0,0,0 }, { 0xfdb800f4,0x87000000,0x0000000c,0x00000000,0x00000040,0x00000000,0x00000000,0x00000000 } },

View file

@ -45,11 +45,7 @@ String SplashCtrl::GenerateVersionInfo(char separator)
#endif
#if CPU_ARM
h << "(ARM";
#if __ARM_FEATURE_UNALIGNED
h << " unaligned";
#endif
h << ")";
h << " (ARM)";
#endif
@ -61,6 +57,9 @@ String SplashCtrl::GenerateVersionInfo(char separator)
h << "Compiled: " << bmTIME;
#endif
h << separator;
h << GetExeFilePath();
return h;
}

View file

@ -433,6 +433,7 @@ bool Ide::Key(dword key, int count)
case K_MOUSE_FORWARD:
History(1);
return true;
#ifndef PLATFORM_COCOA
default:
if(key >= K_SHIFT_CTRL_0 && key <= K_SHIFT_CTRL_9) {
Bookmark& b = bookmark[key - K_SHIFT_CTRL_0];
@ -445,6 +446,7 @@ bool Ide::Key(dword key, int count)
GotoBookmark(bookmark[key - K_CTRL_0]);
return true;
}
#endif
}
return false;
}

View file

@ -74,11 +74,13 @@ void Ide::File(Bar& menu)
.Help("Close the current file tab");
menu.Add(AK_CLOSETABS, THISBACK(ClearTabs))
.Help("Close all file tabs");
#ifndef PLATFORM_COCOA
if(!designer) {
menu.Add("Bookmarks", THISBACK(FileBookmark))
.Help("Set one of available bookmarks (1..9, 0) on current file");
menu.MenuSeparator();
}
#endif
menu.Add("Show/hide bottom pane", THISBACK(SwapBottom))
.Check(IsBottomShown())
.Key(K_ESCAPE)

View file

@ -0,0 +1,9 @@
uses
CtrlLib;
file
main.cpp;
mainconfig
"" = "GUI";

View file

@ -0,0 +1,22 @@
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct MyApp : TopWindow {
void Paint(Draw& w);
};
void MyApp::Paint(Draw& w)
{
w.DrawRect(GetSize(), White());
w.DrawText(10, 300, "key (⌘G) (⇧G) (⌥G)", StdFont(30).Italic());
w.DrawText(10, 330, "key (⌘G) (⇧G) (⌥G)", Arial(30).Italic());
w.DrawText(10, 360, "key (⌘G) (⇧G) (⌥G)", Roman(30).Italic());
for(int i = 0; i < 4; i++)
w.DrawText(10, i * 30, "key (⌘G) (⇧G) (⌥G)", StdFont(30).Bold(i & 1).Italic(i & 2));
}
GUI_APP_MAIN
{
MyApp().Run();
}