Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 5991 → Rev 5992

/programs/cmm/kf_font_viewer/Tupfile.lua
0,0 → 1,6
if tup.getconfig("NO_CMM") ~= "" then return end
if tup.getconfig("LANG") == "ru"
then C_LANG = "LANG_RUS"
else C_LANG = "LANG_ENG" -- this includes default case without config
end
tup.rule("font_viewer.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "font_viewer.com")
/programs/cmm/kf_font_viewer/compile.bat
0,0 → 1,5
C-- "font_viewer.c"
@del "font_viewer"
@rename "font_viewer.com" "font_viewer"
@del warning.txt
@pause
/programs/cmm/kf_font_viewer/font_viewer.c
0,0 → 1,56
#define MEMSIZE 0x2EE80
 
#include "../lib/font.h"
#include "../lib/gui.h"
 
#define PANELH 30
 
void main()
{
proc_info Form;
int i, y, btn;
char line[256], title[4196];
if (!param) strcpy(#param, DEFAULT_FONT);
label.init(#param);
strcpy(#title, "Font preview: ");
strcat(#title, #param);
loop()
{
switch(WaitEvent())
{
case evButton:
btn = GetButtonID();
if (btn==1) ExitProcess();
if (btn==2) label.bold ^=1;
if (btn==3) label.italic ^=1;
if (btn==4) label.smooth ^=1;
goto _DRAW_WINDOW_CONTENT;
case evReDraw:
DefineAndDrawWindow(215,100,500,320,0x74,0xFFFFFF,#title);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) break;
_DRAW_WINDOW_CONTENT:
DrawBar(0, 0, Form.cwidth, PANELH, 0xCCCccc);
CheckBox2(10, 8, 2, "Bold", label.bold);
CheckBox2(70, 8, 3, "Italic", label.italic);
CheckBox2(140, 8, 4, "Smooth", label.smooth);
label.raw_size = free(label.raw);
if (!label.font)
{
DrawBar(0, PANELH, Form.cwidth, Form.cheight - PANELH, 0xFFFfff);
WriteText(10, 50, 0x82, 0xFF00FF, "Font is not loaded.");
}
else for (i=10, y=5; i<22; i++, y+=label.height;) //not flexible, need to calculate font count and max line length
{
sprintf(#line," §¬¥à èà¨äâ /size font %d ¯¨ªá¥«¥©.",i);
label.write_buf(10,y,Form.cwidth,Form.cheight-PANELH, 0xFFFFFF, 0, i, #line);
}
if (label.smooth) label.apply_smooth();
label.show_buf(0, PANELH);
}
}
}
 
void CheckBox2(dword x, y, id, text, byte value) {
CheckBox(x, y, 14, 14, id, text, system.color.work_graph, system.color.work_text, value);
}
/programs/cmm/kf_font_viewer/font/Verdana.kf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programs/cmm/kf_font_viewer/font/Tahoma.kf
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/programs/cmm/kf_font_viewer/font
Property changes:
Added: tsvn:logminsize
+5
\ No newline at end of property
/programs/cmm/kf_font_viewer/.
Property changes:
Added: tsvn:logminsize
+5
\ No newline at end of property