@breakside/jskit 2023.9.0 → 2023.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/JS/DOMParser.js +72 -63
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSClass.js +0 -2
- package/Frameworks/Foundation.jsframework/JS/JSFont.js +8 -0
- package/Frameworks/Foundation.jsframework/JS/JSFontDescriptor.js +5 -0
- package/Frameworks/Foundation.jsframework/JS/JSImage.js +13 -16
- package/Frameworks/Foundation.jsframework/JS/JSTextFramesetter.js +7 -2
- package/Frameworks/Foundation.jsframework/JS/JSTextLine.js +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSTextTypesetter.js +1 -1
- package/Frameworks/Foundation.jsframework/JS/JSXMLParser.js +206 -101
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/sources.json +2 -0
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/Resources.js +13 -16
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/CHPieChart.js +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/DOMParser.js +72 -63
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSClass.js +0 -2
- package/Root/Frameworks/Foundation/JSFont.js +8 -0
- package/Root/Frameworks/Foundation/JSFontDescriptor.js +5 -0
- package/Root/Frameworks/Foundation/JSImage.js +13 -16
- package/Root/Frameworks/Foundation/JSTextFramesetter.js +7 -2
- package/Root/Frameworks/Foundation/JSTextLine.js +2 -2
- package/Root/Frameworks/Foundation/JSTextTypesetter.js +1 -1
- package/Root/Frameworks/Foundation/JSXMLParser.js +206 -101
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/TKTestSuite.js +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIAlertController.js +2 -2
- package/Root/Frameworks/UIKit/UIHTMLTextLine.js +6 -5
- package/Root/Frameworks/UIKit/UIListView.js +4 -1
- package/Root/Frameworks/UIKit/UIMenuBar.js +1 -1
- package/Root/Frameworks/UIKit/UINavigationController.js +6 -1
- package/Root/Frameworks/UIKit/UIVisualEffect+HTML.js +8 -0
- package/Root/Frameworks/UIKit/UIVisualEffect.js +25 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.10.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "82e4b33e5cc31b920a148b1308206727138f5593"
|
|
13
13
|
}
|
|
@@ -22,73 +22,82 @@ JSGlobalObject.DOMParser = function DOMParser(){
|
|
|
22
22
|
|
|
23
23
|
DOMParser.prototype = {
|
|
24
24
|
|
|
25
|
+
document: null,
|
|
26
|
+
currentNode: null,
|
|
27
|
+
|
|
25
28
|
parseFromString: function(str, mimetype){
|
|
26
|
-
var parser = JSXMLParser.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
parser.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
29
|
+
var parser = JSXMLParser.initWithString(str);
|
|
30
|
+
if (mimetype == "text/html"){
|
|
31
|
+
parser.mode = JSXMLParser.Mode.html;
|
|
32
|
+
}
|
|
33
|
+
this.document = null;
|
|
34
|
+
this.currentNode = null;
|
|
35
|
+
parser.delegate = this;
|
|
36
|
+
parser.parse();
|
|
37
|
+
return this.document;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
xmlParserDidBeginDocument: function(parser){
|
|
41
|
+
this.document = DOM.createDocument();
|
|
42
|
+
this.currentNode = this.document;
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
xmlParserFoundDocumentType: function(parser, name, publicId, systemId){
|
|
46
|
+
var doctype = this.document.implementation.createDocumentType(name, publicId, systemId);
|
|
47
|
+
this.document.appendChild(doctype);
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
xmlParserFoundProcessingInstruction: function(parser, name, data){
|
|
51
|
+
var pi = this.document.createProcessingInstruction(name, data);
|
|
52
|
+
this.currentNode.appendChild(pi);
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
xmlParserFoundComment: function(parser, text){
|
|
56
|
+
var comment = this.document.createComment(text);
|
|
57
|
+
this.currentNode.appendChild(comment);
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
xmlParserFoundCDATA: function(parser, text){
|
|
61
|
+
var cdata = this.document.createCDATASection(text);
|
|
62
|
+
this.currentNode.appendChild(cdata);
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
66
|
+
var element;
|
|
67
|
+
if (namespace !== null){
|
|
68
|
+
if (prefix !== null){
|
|
69
|
+
element = this.document.createElementNS(namespace, prefix + ':' + name);
|
|
70
|
+
}else{
|
|
71
|
+
element = this.document.createElementNS(namespace, name);
|
|
72
|
+
}
|
|
73
|
+
}else{
|
|
74
|
+
element = this.document.createElement(name);
|
|
75
|
+
}
|
|
76
|
+
var attrs = attributes.all();
|
|
77
|
+
var attr;
|
|
78
|
+
for (var i = 0, l = attrs.length; i < l; ++i){
|
|
79
|
+
attr = attrs[i];
|
|
80
|
+
if (attr.namespace){
|
|
81
|
+
if (attr.prefix !== null){
|
|
82
|
+
element.setAttributeNS(attr.namespace, attr.prefix + ':' + attr.name, attr.value);
|
|
61
83
|
}else{
|
|
62
|
-
element
|
|
63
|
-
}
|
|
64
|
-
var attr;
|
|
65
|
-
for (var i = 0, l = attributes.length; i < l; ++i){
|
|
66
|
-
attr = attributes[i];
|
|
67
|
-
if (attr.namespace){
|
|
68
|
-
if (attr.prefix !== null){
|
|
69
|
-
element.setAttributeNS(attr.namespace, attr.prefix + ':' + attr.name, attr.value);
|
|
70
|
-
}else{
|
|
71
|
-
element.setAttribute(attr.namespace, attr.name, attr.value);
|
|
72
|
-
}
|
|
73
|
-
}else{
|
|
74
|
-
element.setAttribute(attr.name, attr.value);
|
|
75
|
-
}
|
|
84
|
+
element.setAttribute(attr.namespace, attr.name, attr.value);
|
|
76
85
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
stack.push(node);
|
|
80
|
-
node = element;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
handleText: function(text){
|
|
84
|
-
var textNode = document.createTextNode(text);
|
|
85
|
-
node.appendChild(textNode);
|
|
86
|
-
},
|
|
87
|
-
endElement: function(){
|
|
88
|
-
node = stack.pop();
|
|
86
|
+
}else{
|
|
87
|
+
element.setAttribute(attr.name, attr.value);
|
|
89
88
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
89
|
+
}
|
|
90
|
+
this.currentNode.appendChild(element);
|
|
91
|
+
this.currentNode = element;
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
xmlParserFoundText: function(parser, text){
|
|
95
|
+
var textNode = this.document.createTextNode(text);
|
|
96
|
+
this.currentNode.appendChild(textNode);
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
xmlParserDidEndElement: function(parser){
|
|
100
|
+
this.currentNode = this.currentNode.parentNode;
|
|
92
101
|
}
|
|
93
102
|
|
|
94
103
|
};
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.10.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "82e4b33e5cc31b920a148b1308206727138f5593"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.10.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "82e4b33e5cc31b920a148b1308206727138f5593"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.10.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "82e4b33e5cc31b920a148b1308206727138f5593"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.10.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "82e4b33e5cc31b920a148b1308206727138f5593"
|
|
13
13
|
}
|
|
@@ -134,6 +134,14 @@ JSClass("JSFont", JSObject, {
|
|
|
134
134
|
return JSFont.initWithDescriptor(descriptor, this.pointSize);
|
|
135
135
|
},
|
|
136
136
|
|
|
137
|
+
bolderFont: function(){
|
|
138
|
+
var descriptor = this.descriptor.bolderDescriptor();
|
|
139
|
+
if (descriptor === null){
|
|
140
|
+
descriptor = this.descriptor.fontWithWeight(JSFont.Weight.bold);
|
|
141
|
+
}
|
|
142
|
+
return JSFont.initWithDescriptor(descriptor, this.pointSize);
|
|
143
|
+
},
|
|
144
|
+
|
|
137
145
|
fontWithStyle: function(style){
|
|
138
146
|
if (style == this.descriptor.style){
|
|
139
147
|
return this;
|
|
@@ -43,6 +43,11 @@ JSClass("JSFontDescriptor", JSObject, {
|
|
|
43
43
|
return JSFontDescriptor.descriptorWithFamily(this.family, weight, this.style) || this;
|
|
44
44
|
},
|
|
45
45
|
|
|
46
|
+
bolderDescriptor: function(){
|
|
47
|
+
var weight = this._weight + 300;
|
|
48
|
+
return this.descriptorWithWeight(weight);
|
|
49
|
+
},
|
|
50
|
+
|
|
46
51
|
descriptorWithStyle: function(style){
|
|
47
52
|
return JSFontDescriptor.descriptorWithFamily(this.family, this.weight, style) || this;
|
|
48
53
|
},
|
|
@@ -373,10 +373,10 @@ _JSDataImage.sizeFromJPEGData = function(data){
|
|
|
373
373
|
};
|
|
374
374
|
|
|
375
375
|
_JSDataImage.sizeFromSVGData = function(data){
|
|
376
|
-
var parser = JSXMLParser.
|
|
376
|
+
var parser = JSXMLParser.initWithData(data);
|
|
377
377
|
var size = JSSize(1, 1);
|
|
378
|
-
parser.
|
|
379
|
-
|
|
378
|
+
parser.delegate = {
|
|
379
|
+
xmlParserDidBeginElement: function(parser, name, prefix, namespace, attributes){
|
|
380
380
|
var multiple = {
|
|
381
381
|
'em': 12,
|
|
382
382
|
'ex': 24,
|
|
@@ -406,25 +406,22 @@ _JSDataImage.sizeFromSVGData = function(data){
|
|
|
406
406
|
return multiple[unit] * n;
|
|
407
407
|
};
|
|
408
408
|
if (namespace == 'http://www.w3.org/2000/svg' && name.toLowerCase() == 'svg'){
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
size.width = px(attrs.width);
|
|
418
|
-
size.height = px(attrs.height);
|
|
419
|
-
}else if (attrs.viewBox){
|
|
420
|
-
var box = attrs.viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
409
|
+
var width = attributes.get("width");
|
|
410
|
+
var height = attributes.get("height");
|
|
411
|
+
var viewBox = attributes.get("viewBox");
|
|
412
|
+
if (width && height){
|
|
413
|
+
size.width = px(width);
|
|
414
|
+
size.height = px(height);
|
|
415
|
+
}else if (viewBox){
|
|
416
|
+
var box = viewBox.split(/\s+/).map(function(n){ return parseInt(n); });
|
|
421
417
|
size.width = box[2];
|
|
422
418
|
size.height = box[3];
|
|
423
419
|
}
|
|
424
420
|
}
|
|
425
421
|
parser.stop();
|
|
426
422
|
}
|
|
427
|
-
}
|
|
423
|
+
};
|
|
424
|
+
parser.parse();
|
|
428
425
|
return size;
|
|
429
426
|
};
|
|
430
427
|
|
|
@@ -109,11 +109,16 @@ JSClass("JSTextFramesetter", JSObject, {
|
|
|
109
109
|
if (remianingRange.length > 0 && lineLimit > lines.length + 1){
|
|
110
110
|
// we got truncated because of height. Re-run the last line so it
|
|
111
111
|
// gets broken according to truncation rules rather than word break
|
|
112
|
+
y = line.origin.y;
|
|
112
113
|
lineRange = this._typesetter.suggestLineBreak(widthLimit, JSRange(line.range.location, line.range.length + remianingRange.length), paragraphStyle.lineBreakMode);
|
|
113
114
|
line = this._typesetter.createLine(lineRange);
|
|
115
|
+
line.origin.y = y;
|
|
116
|
+
line = line.truncatedLine(widthLimit, undefined, true);
|
|
117
|
+
lines.push(line);
|
|
118
|
+
}else{
|
|
119
|
+
line = line.truncatedLine(widthLimit);
|
|
120
|
+
lines.push(line);
|
|
114
121
|
}
|
|
115
|
-
var truncated = line.truncatedLine(widthLimit);
|
|
116
|
-
lines.push(truncated);
|
|
117
122
|
}
|
|
118
123
|
var frame = this.constructFrame(lines, size);
|
|
119
124
|
this._alignLinesInFrame(frame);
|
|
@@ -191,8 +191,8 @@ JSClass("JSTextLine", JSObject, {
|
|
|
191
191
|
return line;
|
|
192
192
|
},
|
|
193
193
|
|
|
194
|
-
truncatedLine: function(width, token){
|
|
195
|
-
if (width + 0.1 >= this._size.width){
|
|
194
|
+
truncatedLine: function(width, token, force){
|
|
195
|
+
if (width + 0.1 >= this._size.width && force !== true){
|
|
196
196
|
return this;
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -335,7 +335,7 @@ JSClass("JSTextTypesetter", JSObject, {
|
|
|
335
335
|
if (attributes.bold || attributes.italic){
|
|
336
336
|
attributes = JSCopy(attributes);
|
|
337
337
|
if (attributes.bold){
|
|
338
|
-
attributes.font = attributes.font.
|
|
338
|
+
attributes.font = attributes.font.bolderFont();
|
|
339
339
|
}
|
|
340
340
|
if (attributes.italic){
|
|
341
341
|
attributes.font = attributes.font.fontWithStyle(JSFont.Style.italic);
|