From 3c699ca0fa3870fce82abf47ed3d2ea99043bdfa Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 3 Jan 2024 14:52:53 +0000 Subject: AllocFont() -> InitFont() in comments. Stolen from "less_tests_constraints" branch --- tests/unixFont.test | 22 +++++++++++----------- tests/winFont.test | 8 ++++---- unix/tkUnixFont.c | 2 +- win/tkWinFont.c | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/unixFont.test b/tests/unixFont.test index 3aeaa22..217e639 100644 --- a/tests/unixFont.test +++ b/tests/unixFont.test @@ -236,7 +236,7 @@ test unixfont-7.3 {DrawChars procedure: overstrike} x11 { .b.l config -font $f } {} -test unixfont-8.1 {AllocFont procedure: use old font} x11 { +test unixfont-8.1 {InitFont procedure: use old font} x11 { font create xyz button .c -font xyz font configure xyz -family times @@ -244,10 +244,10 @@ test unixfont-8.1 {AllocFont procedure: use old font} x11 { destroy .c font delete xyz } {} -test unixfont-8.2 {AllocFont procedure: parse information from XLFD} x11 { +test unixfont-8.2 {InitFont procedure: parse information from XLFD} x11 { expr {[lindex [font actual {-family times -size 0}] 3] == 0} } 0 -test unixfont-8.3 {AllocFont procedure: can't parse info from name} x11 { +test unixfont-8.3 {InitFont procedure: can't parse info from name} x11 { catch {unset fontArray} # check that font actual returns the correct attributes. # the values of those attributes are system dependent. @@ -256,7 +256,7 @@ test unixfont-8.3 {AllocFont procedure: can't parse info from name} x11 { catch {unset fontArray} set result } {-family -overstrike -size -slant -underline -weight} -test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu failsOnXQuarz} { +test unixfont-8.4 {InitFont procedure: classify characters} {x11 failsOnUbuntu failsOnXQuarz} { set x 0 incr x [font measure $courier "\u4000"] ;# 6 incr x [font measure $courier "\002"] ;# 4 @@ -264,33 +264,33 @@ test unixfont-8.4 {AllocFont procedure: classify characters} {x11 failsOnUbuntu incr x [font measure $courier "\101"] ;# 1 set x } [expr $cx*13] -test unixfont-8.5 {AllocFont procedure: setup widths of normal chars} x11 { +test unixfont-8.5 {InitFont procedure: setup widths of normal chars} x11 { font metrics $courier -fixed } 1 -test unixfont-8.6 {AllocFont procedure: setup widths of special chars} {x11 failsOnUbuntu failsOnXQuarz} { +test unixfont-8.6 {InitFont procedure: setup widths of special chars} {x11 failsOnUbuntu failsOnXQuarz} { set x 0 incr x [font measure $courier "\001"] ;# 4 incr x [font measure $courier "\002"] ;# 4 incr x [font measure $courier "\012"] ;# 2 set x } [expr $cx*10] -test unixfont-8.7 {AllocFont procedure: XA_UNDERLINE_POSITION} x11 { +test unixfont-8.7 {InitFont procedure: XA_UNDERLINE_POSITION} x11 { catch {font actual -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1} set x {} } {} -test unixfont-8.8 {AllocFont procedure: no XA_UNDERLINE_POSITION} x11 { +test unixfont-8.8 {InitFont procedure: no XA_UNDERLINE_POSITION} x11 { catch {font actual --symbol-medium-r-normal--0-0-0-0-p-0-sun-fontspecific} set x {} } {} -test unixfont-8.9 {AllocFont procedure: XA_UNDERLINE_THICKNESS} x11 { +test unixfont-8.9 {InitFont procedure: XA_UNDERLINE_THICKNESS} x11 { catch {font actual -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1} set x {} } {} -test unixfont-8.10 {AllocFont procedure: no XA_UNDERLINE_THICKNESS} x11 { +test unixfont-8.10 {InitFont procedure: no XA_UNDERLINE_THICKNESS} x11 { catch {font actual --symbol-medium-r-normal--0-0-0-0-p-0-sun-fontspecific} set x {} } {} -test unixfont-8.11 {AllocFont procedure: XA_UNDERLINE_POSITION was 0} x11 { +test unixfont-8.11 {InitFont procedure: XA_UNDERLINE_POSITION was 0} x11 { catch {font actual -adobe-courier-bold-i-normal--0-0-0-0-m-0-iso8859-1} set x {} } {} diff --git a/tests/winFont.test b/tests/winFont.test index f5c945d..d769725 100644 --- a/tests/winFont.test +++ b/tests/winFont.test @@ -354,7 +354,7 @@ test winfont-6.1 {Tk_DrawChars procedure: loop test} -constraints win -setup { } -result {} -test winfont-7.1 {AllocFont procedure: use old font} -constraints win -setup { +test winfont-7.1 {InitFont procedure: use old font} -constraints win -setup { destroy .c } -setup { catch {font delete xyz} @@ -366,17 +366,17 @@ test winfont-7.1 {AllocFont procedure: use old font} -constraints win -setup { destroy .c font delete xyz } -result {} -test winfont-7.2 {AllocFont procedure: extract info from logfont} -constraints { +test winfont-7.2 {InitFont procedure: extract info from logfont} -constraints { win } -body { font actual {arial 10 bold italic underline overstrike} } -result {-family Arial -size 10 -weight bold -slant italic -underline 1 -overstrike 1} -test winfont-7.3 {AllocFont procedure: extract info from textmetric} -constraints { +test winfont-7.3 {InitFont procedure: extract info from textmetric} -constraints { win } -body { font metric {arial 10 bold italic underline overstrike} -fixed } -result 0 -test winfont-7.4 {AllocFont procedure: extract info from textmetric} -constraints { +test winfont-7.4 {InitFont procedure: extract info from textmetric} -constraints { win } -body { font metric systemfixed -fixed diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 4c7d1ce..5e14eea 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -105,7 +105,7 @@ typedef struct UnixFont { * order to draw/measure all the characters * encountered by this font so far. All fonts * start off with one SubFont initialized by - * AllocFont() from the original set of font + * InitFont() from the original set of font * attributes. Usually points to * staticSubFonts, but may point to malloced * space if there are lots of SubFonts. */ diff --git a/win/tkWinFont.c b/win/tkWinFont.c index 375af22..daa79b8 100644 --- a/win/tkWinFont.c +++ b/win/tkWinFont.c @@ -122,7 +122,7 @@ typedef struct WinFont { * order to draw/measure all the characters * encountered by this font so far. All fonts * start off with one SubFont initialized by - * AllocFont() from the original set of font + * InitFont() from the original set of font * attributes. Usually points to * staticSubFonts, but may point to malloced * space if there are lots of SubFonts. */ -- cgit v0.12