diff --git a/programs/network/htmlv/browser/HTMLv.c b/programs/network/htmlv/browser/HTMLv.c index b06123946a..ef87b94846 100644 --- a/programs/network/htmlv/browser/HTMLv.c +++ b/programs/network/htmlv/browser/HTMLv.c @@ -47,35 +47,52 @@ mouse m; #include "TWB.h" #include "include\menu_rmb.h" -/*void tre() +void tre() { char *font_picture; - char text[12]; + char text[20]; int width=600; - int height=40; - char palette[256*4]; + int height=20; +// char palette[256*4]; int x; - - + debug("fuck this shit\n"); + //init_font(#fontinfo); + debug("fuck this shit!\n"); + strcpy(#text, "hello world\0"); - - get_width stdcall (#text, -1, height); + + text_out stdcall (#text, #fontlol, 17, 0x0, 10, 10); + + strcpy(#text, "fuck this shit!\0"); + + text_out stdcall (#text, #fontlol, 27, 0x0, 10, 30); + + + strcpy(#text, "alarm!\0"); + + text_out stdcall (#text, #fontlol, 47, 0x00FF0000, 10, 70); + /* + strcpy(#text, "hello world\0"); + + debug("get width\n"); + get_width stdcall (#text, #fontinfo, height); width=EAX; - + for (x=0;x<20;x++) { + init_font(#fontinfo); + debug("yaya\n"); font_picture=mem_Alloc(width*height); - truetype stdcall (#text, -1, font_picture, width, height); + text[1]=30+x; + truetype stdcall (#text, #fontinfo, font_picture, width, height); - for (x=0;x<256;x++) { - palette[x*4]=255-x; - palette[x*4+1]=255-x; - palette[x*4+2]=255-x; - palette[x*4+3]=0; - } + debug("blyad'!\n"); - PutPaletteImage(font_picture,width,height,0,0,8,#palette); - mem_Free(font_picture); -};*/ + + PutPaletteImage(font_picture,width,height,0,20*x,8,#palette); + mem_Free(font_picture); }*/ +} + +char fontlol[64]; void main() { @@ -91,6 +108,8 @@ void main() load_dll2(#abox_lib, #boxlib_init,0); if (load_dll2(libtruetype, #truetype,0)!=0) {debug("Не удалось подключить библиотеку TrueType"w); use_truetype = 2;} + init_font(#fontlol); + if (!URL) strcpy(#URL, "/sys/home.htm"); strcpy(#editURL, #URL); @@ -241,7 +260,7 @@ void Draw_Window() SetElementSizes(); WB1.ShowPage(); - + //tre(); DefineButton(scroll1.start_x+1, scroll1.start_y+1, 16, 16, ID1+BT_HIDE, 0xE4DFE1); DefineButton(scroll1.start_x+1, scroll1.start_y+scroll1.size_y-18, 16, 16, ID2+BT_HIDE, 0xE4DFE1); } diff --git a/programs/network/htmlv/browser/History.txt b/programs/network/htmlv/browser/History.txt index 4c2fd93b87..0b9d00617a 100644 --- a/programs/network/htmlv/browser/History.txt +++ b/programs/network/htmlv/browser/History.txt @@ -1,3 +1,7 @@ +11.11.12 - 0.97.6a +SoUrcerer - Синхронизация программы с новой +оптимизированной версией библитеки TryeType. + 10.11.12 - 0.97.6 - нормальный запуск программы даже без библиотеки lib_img; - оповещение если box_lib не найдена; diff --git a/programs/network/htmlv/browser/TWB.h b/programs/network/htmlv/browser/TWB.h index 06fbf7021a..1e3fbcb3a7 100644 --- a/programs/network/htmlv/browser/TWB.h +++ b/programs/network/htmlv/browser/TWB.h @@ -548,7 +548,7 @@ void TWebBrowser::DrawPage() // if (use_truetype == 1) { //line_length = get_length stdcall (#line,-1,16,line_length); - text_out stdcall (#line, -1, 17, text_colors[text_color_index], start_x, start_y-3); + text_out stdcall (#line, #fontlol, 17, text_colors[text_color_index], start_x, start_y-3); } else { @@ -879,4 +879,4 @@ void TWebBrowser::DrawScroller() // scroll1.size_y=WB1.height; scrollbar_v_draw(#scroll1); -} \ No newline at end of file +} diff --git a/programs/network/htmlv/lib/truetype.h b/programs/network/htmlv/lib/truetype.h index e6c8ffee35..5d8c3057fd 100644 --- a/programs/network/htmlv/lib/truetype.h +++ b/programs/network/htmlv/lib/truetype.h @@ -1,5 +1,7 @@ //это вставить после загрузки основных библиотек +char fontinfo[28]; + dword libtruetype = #att; char att[] = "/sys/lib/truetype.obj"; //"truetype.obj\0"; @@ -8,6 +10,7 @@ dword truetype = #att_truetype; dword get_length = #att_get_length; dword get_width = #att_get_width; dword text_out = #att_text_out; +dword init_font = #att_init_font; dword am3__ = 0x0; dword bm3__ = 0x0; @@ -18,6 +21,7 @@ char att_truetype[] = "truetype"; char att_get_length[] = "get_length"; char att_get_width[] = "get_width"; char att_text_out[] = "text_out"; +char att_init_font[] = "init_font"; //load_dll2(libtruetype, #truetype,0);