forked from KolibriOS/kolibrios
Font size setting f48.11, f48.12
New option in f4 git-svn-id: svn://kolibrios.org@5867 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ef9ddaeb38
commit
f6e1ec2684
@ -206,6 +206,7 @@
|
|||||||
* B=1 - закрашивать фон (цвет = edi)
|
* B=1 - закрашивать фон (цвет = edi)
|
||||||
* FF задает шрифт и кодировку:
|
* FF задает шрифт и кодировку:
|
||||||
0 = 6x9 cp866
|
0 = 6x9 cp866
|
||||||
|
1 = 8x16 cp866
|
||||||
2 = 8x16 UTF-16LE
|
2 = 8x16 UTF-16LE
|
||||||
3 = 8x16 UTF-8
|
3 = 8x16 UTF-8
|
||||||
* C=0 - рисовать в окно,
|
* C=0 - рисовать в окно,
|
||||||
@ -2191,6 +2192,23 @@ dword-значение цвета 0x00RRGGBB
|
|||||||
* ebx = 10 - номер подфункции
|
* ebx = 10 - номер подфункции
|
||||||
* cl = 2 - субпиксельное, 1 - обычное, 0 - выключить
|
* cl = 2 - субпиксельное, 1 - обычное, 0 - выключить
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======== Функция 48, подфункция 11 - получить размер шрифтов. ========
|
||||||
|
======================================================================
|
||||||
|
Параметры:
|
||||||
|
* eax = 48 - номер функции
|
||||||
|
* ebx = 9 - номер подфункции
|
||||||
|
Возвращаемое значение:
|
||||||
|
* eax = текущая высота шрифта в пикселях
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
======= Функция 48, подфункция 12 - установить размер шрифтов. =======
|
||||||
|
======================================================================
|
||||||
|
Параметры:
|
||||||
|
* eax = 48 - номер функции
|
||||||
|
* ebx = 10 - номер подфункции
|
||||||
|
* cl = новая высота шрифта в пикселях
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
============ Функция 49 - Advanced Power Management (APM). ===========
|
============ Функция 49 - Advanced Power Management (APM). ===========
|
||||||
======================================================================
|
======================================================================
|
||||||
|
@ -204,6 +204,7 @@ Parameters:
|
|||||||
* B=1 - fill background (color = edi)
|
* B=1 - fill background (color = edi)
|
||||||
* FF specifies the font and encoding:
|
* FF specifies the font and encoding:
|
||||||
0 = 6x9 cp866
|
0 = 6x9 cp866
|
||||||
|
1 = 8x16 cp866
|
||||||
2 = 8x16 UTF-16LE
|
2 = 8x16 UTF-16LE
|
||||||
3 = 8x16 UTF-8
|
3 = 8x16 UTF-8
|
||||||
* C=0 - draw to the window,
|
* C=0 - draw to the window,
|
||||||
@ -2173,6 +2174,23 @@ Parameters:
|
|||||||
* ebx = 10 - subfunction number
|
* ebx = 10 - subfunction number
|
||||||
* cl = 2 - subpixel, 1 - anti-aliasing, 0 - off
|
* cl = 2 - subpixel, 1 - anti-aliasing, 0 - off
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
============ Function 48, subfunction 11 - get font size. ============
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 48 - function number
|
||||||
|
* ebx = 9 - subfunction number
|
||||||
|
Returned value:
|
||||||
|
* eax = current font height in pixels
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
============ Function 48, subfunction 12 - set font size. ============
|
||||||
|
======================================================================
|
||||||
|
Parameters:
|
||||||
|
* eax = 48 - function number
|
||||||
|
* ebx = 10 - subfunction number
|
||||||
|
* cl = new font height in pixels
|
||||||
|
|
||||||
======================================================================
|
======================================================================
|
||||||
=========== Function 49 - Advanced Power Management (APM). ===========
|
=========== Function 49 - Advanced Power Management (APM). ===========
|
||||||
======================================================================
|
======================================================================
|
||||||
|
@ -18,7 +18,8 @@ dtext:
|
|||||||
; Z=1: edx -> zero terminated string, esi = ?
|
; Z=1: edx -> zero terminated string, esi = ?
|
||||||
; B=1: fill background with color eax
|
; B=1: fill background with color eax
|
||||||
; R=1: edi -> user area for redirect
|
; 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
|
; SSS = (font multiplier)-1
|
||||||
; edi=1: force output
|
; edi=1: force output
|
||||||
and eax, 0xFFFFFF
|
and eax, 0xFFFFFF
|
||||||
@ -64,8 +65,8 @@ dtext:
|
|||||||
bt ebx, 27
|
bt ebx, 27
|
||||||
jc .bufferReady
|
jc .bufferReady
|
||||||
mov eax, 9
|
mov eax, 9
|
||||||
bt ebx, 29
|
test ebx, 0x30000000
|
||||||
jnc @f
|
jz @f
|
||||||
add eax, 7
|
add eax, 7
|
||||||
@@:
|
@@:
|
||||||
imul eax, ecx
|
imul eax, ecx
|
||||||
@ -91,7 +92,11 @@ dtext:
|
|||||||
mov ebp, eax
|
mov ebp, eax
|
||||||
xor edx, edx
|
xor edx, edx
|
||||||
bt ebx, 29
|
bt ebx, 29
|
||||||
jnc .draw866
|
jc @f
|
||||||
|
bt ebx, 28
|
||||||
|
jc .draw866toUni
|
||||||
|
jmp .draw866
|
||||||
|
@@:
|
||||||
bt ebx, 28
|
bt ebx, 28
|
||||||
jc .drawUTF8
|
jc .drawUTF8
|
||||||
|
|
||||||
@ -191,6 +196,27 @@ deltaToScreen = 28
|
|||||||
pop esi
|
pop esi
|
||||||
jmp .draw866
|
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:
|
.done:
|
||||||
mov ecx, edi
|
mov ecx, edi
|
||||||
pop eax eax eax esi edx ebx ebp ebp ebp
|
pop eax eax eax esi edx ebx ebp ebp ebp
|
||||||
@ -786,7 +812,8 @@ antiAliasing:
|
|||||||
mov ebp, ebx
|
mov ebp, ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
fontSmoothing db 2
|
fontSmoothing db 2 ; = 0, 1 or 2
|
||||||
|
fontSize db 0 ; user mode setting
|
||||||
font1:
|
font1:
|
||||||
if lang eq sp
|
if lang eq sp
|
||||||
file 'char_sp.mt'
|
file 'char_sp.mt'
|
||||||
|
@ -130,6 +130,14 @@ syscall_display_settings: ;///// system function 48 ///////////////////////////
|
|||||||
;; Set font smoothing:
|
;; Set font smoothing:
|
||||||
;< ebx = 10
|
;< ebx = 10
|
||||||
;< ecx = 0 — off, 1 — on, 2 — subpixel
|
;< 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
|
cmp ebx, .sizeof.ftable / 4
|
||||||
ja @f
|
ja @f
|
||||||
@ -264,6 +272,16 @@ syscall_display_settings.10:
|
|||||||
mov [fontSmoothing], cl
|
mov [fontSmoothing], cl
|
||||||
ret
|
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:
|
syscall_display_settings._.calculate_whole_screen:
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
xor ebx, ebx
|
xor ebx, ebx
|
||||||
@ -1394,7 +1412,7 @@ sys_window_moving_handler: ;///////////////////////////////////////////////////
|
|||||||
|
|
||||||
iglobal
|
iglobal
|
||||||
FuncTable syscall_display_settings, ftable, \
|
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
|
align 4
|
||||||
window_topleft dd \
|
window_topleft dd \
|
||||||
|
Loading…
Reference in New Issue
Block a user