Skip to content

Commit 2032ee1

Browse files
committed
merge with devel
2 parents 20e06c9 + 1195f78 commit 2032ee1

14 files changed

+103
-42
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.37.1
2+
### Bugfix
3+
* fix wrong calculation of characters with custom font [#892](https://github.com/jcubic/jquery.terminal/issues/892)
4+
15
## 2.37.0
26
### Features
37
* add `rpc` interceptor [#883](https://github.com/jcubic/jquery.terminal/issues/883)

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<h1 align="center">
2-
<img src="https://github.com/jcubic/jquery.terminal/blob/master/assets/ascii_art.svg?raw=true&ver=2.37.0"
2+
<img src="https://github.com/jcubic/jquery.terminal/blob/devel/assets/ascii_art.svg?raw=true&ver=DEV"
33
alt="ASCII Art that represent text jQuery Terminal - JavaScript Library for Web Based Terminal Emulators" />
44
</h1>
55

66
[JavaScript Library for Web Based Terminal Emulators](https://terminal.jcubic.pl)
77

8-
[![npm](https://img.shields.io/badge/npm-2.37.0-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
9-
![bower](https://img.shields.io/badge/bower-2.37.0-yellow.svg)
10-
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=master&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
11-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&75da0f6ae07388cf17379f7dcd13e04f)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
8+
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
9+
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
10+
[![Build and test](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/jquery.terminal/actions/workflows/build.yaml)
11+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&75da0f6ae07388cf17379f7dcd13e04f)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
1212
![NPM Downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
1313
[![jsDelivr Downloads](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded&n=1)](https://www.jsdelivr.com/package/npm/jquery.terminal)
1414
[![Paid Support](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
@@ -87,7 +87,7 @@ You can test current version at this URL:
8787

8888
or if it doesn't use latest version (because of jsDelivr cache) you can force it with this URL:
8989

90-
* [https://jcubic.github.io/jquery.terminal/?ver=2.37.0](https://jcubic.github.io/jquery.terminal/?ver=2.37.0)
90+
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)
9191

9292
And development version using:
9393

@@ -106,20 +106,20 @@ or use jsDelivr:
106106

107107
```
108108

109-
Then include js/jquery.terminal-2.37.0.min.js and css/jquery.terminal-2.37.0.min.css
109+
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css
110110

111111
You can grab the files from CDN:
112112

113113
```html
114-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.37.0/js/jquery.terminal.min.js"></script>
115-
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.37.0/css/jquery.terminal.min.css" rel="stylesheet"/>
114+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
115+
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
116116
```
117117

118118
or
119119

120120
```html
121-
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.37.0/js/jquery.terminal.min.js"></script>
122-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.37.0/css/jquery.terminal.min.css">
121+
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
122+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css">
123123
```
124124

125125
If you always want latest version, you can get it from [unpkg](https://unpkg.com/) without specifying version,

css/emoji.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal-2.37.0.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.37.0
7+
* \/ /____/ version DEV
88
* http://terminal.jcubic.pl
99
*
1010
* This file is part of jQuery Terminal.
1111
*
1212
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
1313
* Released under the MIT license
1414
*
15-
* Date: Sun, 30 Jul 2023 18:29:44 +0000
15+
* Date: Wed, 02 Aug 2023 15:54:42 +0000
1616
*/
1717
.terminal .terminal-output .format, .cmd .format,
1818
.cmd-prompt, .cmd-prompt div {

css/jquery.terminal-2.37.0.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.37.0
7+
* \/ /____/ version DEV
88
* http://terminal.jcubic.pl
99
*
1010
* This file is part of jQuery Terminal.
1111
*
1212
* Copyright (c) 2011-2023 Jakub T. Jankiewicz <https://jcubic.pl/me>
1313
* Released under the MIT license
1414
*
15-
* Date: Sun, 30 Jul 2023 18:29:44 +0000
15+
* Date: Wed, 02 Aug 2023 15:54:42 +0000
1616
*/
1717
.terminal .terminal-output .format, .cmd .format,
1818
.cmd-prompt, .cmd-prompt div {

css/jquery.terminal.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/jquery.terminal.min.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jquery.terminal-2.37.0.js

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.37.0
7+
* \/ /____/ version DEV
88
*
99
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
1010
*
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Sun, 30 Jul 2023 18:29:43 +0000
44+
* Date: Wed, 02 Aug 2023 16:00:14 +0000
4545
*/
4646
/* global define, Map */
4747
/* eslint-disable */
@@ -5277,8 +5277,8 @@
52775277
}
52785278
// -------------------------------------------------------------------------
52795279
$.terminal = {
5280-
version: '2.37.0',
5281-
date: 'Sun, 30 Jul 2023 18:29:43 +0000',
5280+
version: 'DEV',
5281+
date: 'Wed, 02 Aug 2023 16:00:14 +0000',
52825282
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
52835283
color_names: [
52845284
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
@@ -7320,6 +7320,18 @@
73207320
return Array.isArray(object);
73217321
}
73227322
// -----------------------------------------------------------------------
7323+
function have_custom_font(term) {
7324+
var custom_font = $(term).css('--font');
7325+
if (!custom_font) {
7326+
return false;
7327+
}
7328+
var fonts = Array.from(document.fonts.keys());
7329+
var font = fonts.find(function(face) {
7330+
return face.family === custom_font;
7331+
});
7332+
return !!font;
7333+
}
7334+
// -----------------------------------------------------------------------
73237335
function get_type(object) {
73247336
if (typeof object === 'function') {
73257337
return 'function';
@@ -11624,7 +11636,6 @@
1162411636
requests.push(xhr);
1162511637
});
1162611638
var scroller = $('<div class="terminal-scroller"/>').appendTo(self);
11627-
$('<div class="terminal-font-forcer terminal-hidden">x<div>').appendTo(self);
1162811639
var wrapper = $('<div class="terminal-wrapper"/>').appendTo(scroller);
1162911640
$(broken_image).hide().appendTo(wrapper);
1163011641
var font_resizer = $('<div class="terminal-font">&nbsp;</div>').appendTo(self);
@@ -12180,6 +12191,8 @@
1218012191
pixel_density = get_pixel_size();
1218112192
self.resize();
1218212193
}, options);
12194+
$('<div class="terminal-font-forcer terminal-hidden">x<div>')
12195+
.appendTo(self);
1218312196
}
1218412197
function bottom_detect(intersections) {
1218512198
is_bottom_detected = intersections[0].intersectionRatio >= 0.9;
@@ -12277,7 +12290,13 @@
1227712290
}
1227812291
// wait for custom font to load #892
1227912292
if (document.fonts && document.fonts.ready) {
12280-
document.fonts.ready.then(command_queue.resolve);
12293+
document.fonts.ready.then(function() {
12294+
if (have_custom_font(self)) {
12295+
calculate_char_size();
12296+
self.resize();
12297+
}
12298+
command_queue.resolve();
12299+
});
1228112300
} else {
1228212301
command_queue.resolve();
1228312302
}

js/jquery.terminal-2.37.0.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)