Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5866 → Rev 5867

/kernel/trunk/gui/font.inc
18,7 → 18,8
; Z=1: edx -> zero terminated string, esi = ?
; B=1: fill background with color eax
; R=1: edi -> user area for redirect
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16, FF=0: 866 6x9
; FF=3: UTF-8 8x16, FF=2: UTF-16LE 8x16
; FF=1: cp866 8x16, FF=0: cp866 6x9
; SSS = (font multiplier)-1
; edi=1: force output
and eax, 0xFFFFFF
64,8 → 65,8
bt ebx, 27
jc .bufferReady
mov eax, 9
bt ebx, 29
jnc @f
test ebx, 0x30000000
jz @f
add eax, 7
@@:
imul eax, ecx
91,8 → 92,12
mov ebp, eax
xor edx, edx
bt ebx, 29
jnc .draw866
jc @f
bt ebx, 28
jc .draw866toUni
jmp .draw866
@@:
bt ebx, 28
jc .drawUTF8
 
; Stack map:
191,6 → 196,27
pop esi
jmp .draw866
 
.draw866toUni:
dec dword [esp]
js .done
xor eax, eax
mov al, [esi]
test eax, eax
jz .done
call ansi2uni_char
shl eax, 4
lea ebx, [eax+fontUni]
inc esi
pushd esi edi 16
mov esi, [esp+12+fontMultiplier]
call drawChar
imul esi, 8*4
pop edi
pop edi
add edi, esi
pop esi
jmp .draw866toUni
 
.done:
mov ecx, edi
pop eax eax eax esi edx ebx ebp ebp ebp
786,7 → 812,8
mov ebp, ebx
ret
 
fontSmoothing db 2
fontSmoothing db 2 ; = 0, 1 or 2
fontSize db 0 ; user mode setting
font1:
if lang eq sp
file 'char_sp.mt'
/kernel/trunk/gui/window.inc
130,6 → 130,14
;; Set font smoothing:
;< ebx = 10
;< ecx = 0 — off, 1 — on, 2 — subpixel
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;; Get font size:
;< ebx = 11
;> eax = height in pixels
; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;; Set font size:
;< ebx = 12
;< ecx = height in pixels
;------------------------------------------------------------------------------
cmp ebx, .sizeof.ftable / 4
ja @f
264,6 → 272,16
mov [fontSmoothing], cl
ret
;------------------------------------------------------------------------------
syscall_display_settings.11:
xor eax, eax
mov al, [fontSize]
mov [esp + 32], eax
ret
;------------------------------------------------------------------------------
syscall_display_settings.12:
mov [fontSize], cl
ret
;------------------------------------------------------------------------------
syscall_display_settings._.calculate_whole_screen:
xor eax, eax
xor ebx, ebx
1394,7 → 1412,7
 
iglobal
FuncTable syscall_display_settings, ftable, \
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12
 
align 4
window_topleft dd \