Skip to content

Commit

Permalink
FIX: additional fix for issue red#5471 (Rich-text size is inconsisten…
Browse files Browse the repository at this point in the history
…t across various setups)
  • Loading branch information
qtxie committed Feb 14, 2024
1 parent f519e8a commit b40559e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 5 additions & 2 deletions modules/view/backends/windows/direct2d.reds
Original file line number Diff line number Diff line change
Expand Up @@ -2130,8 +2130,11 @@ create-text-format: func [
if TYPE_OF(value) = TYPE_NONE [make-font face font] ;-- make a GDI font

int: as red-integer! values + FONT_OBJ_SIZE
len: either TYPE_OF(int) <> TYPE_INTEGER [10][int/value]
if len <= 0 [len: 10]
len: either TYPE_OF(int) <> TYPE_INTEGER [0][int/value]
if len <= 0 [
int: as red-integer! #get system/view/fonts/size
len: int/value
]
ft-sz: as float! len
size: ConvertPointSizeToDIP(ft-sz)

Expand Down
2 changes: 0 additions & 2 deletions modules/view/backends/windows/gui.reds
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,6 @@ set-defaults: func [
len
#get system/view/fonts/system
UTF-16LE

font/lfHeight: font/lfHeight * log-pixels-y / inital-dpi ;-- font/lfHeight isn't affected by DPI change, we update it manually
integer/make-at
#get system/view/fonts/size
0 - (font/lfHeight * 72 / log-pixels-y)
Expand Down

0 comments on commit b40559e

Please sign in to comment.