Skip to content

Commit

Permalink
Add new opt-in RescaleOverlappingGlyphs option
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Apr 16, 2024
1 parent dccf370 commit d5b64e5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,8 @@ Blazor WebAssembly `index.html`
<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>

<!-- Load the XtermBlazor library and register addons -->
<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>

<!-- Register addon to XtermBlazor -->
<script>XtermBlazor.registerAddons({"addon-fit": new FitAddon.FitAddon()});</script>
```

Expand All @@ -104,9 +103,9 @@ Blazor Server `_Host.cshtml`
<script src="https://cdn.jsdelivr.net/npm/@@xterm/[email protected]/lib/addon-fit.min.js"></script>

<script src="_framework/blazor.server.js"></script>
<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>

<!-- Register addon to XtermBlazor -->
<!-- Load the XtermBlazor library and register addons -->
<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>
<script>XtermBlazor.registerAddons({"addon-fit": new FitAddon.FitAddon()});</script>
```

Expand Down
7 changes: 4 additions & 3 deletions XtermBlazor.Demo.Server/Pages/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
<a class="dismiss">🗙</a>
</div>

<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-fit@0.9.0/lib/addon-fit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-search@0.14.0/lib/addon-search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-web-links@0.10.0/lib/addon-web-links.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-fit@0.10.0/lib/addon-fit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-search@0.15.0/lib/addon-search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-web-links@0.11.0/lib/addon-web-links.min.js"></script>

<script src="_framework/blazor.server.js"></script>

<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>
<script>
XtermBlazor.registerAddons({
Expand Down
6 changes: 3 additions & 3 deletions XtermBlazor.Demo.Wasm/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<a class="dismiss">🗙</a>
</div>

<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-fit@0.9.0/lib/addon-fit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-search@0.14.0/lib/addon-search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-web-links@0.10.0/lib/addon-web-links.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-fit@0.10.0/lib/addon-fit.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-search@0.15.0/lib/addon-search.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-web-links@0.11.0/lib/addon-web-links.min.js"></script>

<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>
Expand Down
13 changes: 13 additions & 0 deletions XtermBlazor/TerminalOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,19 @@ public class TerminalOptions
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? MinimumContrastRatio { get; set; }

/// <summary>
/// Whether to rescale glyphs horizontally that are a single cell wide but
/// have glyphs that would overlap following cell(s). This typically happens
/// for ambiguous width characters (eg. the roman numeral characters U+2160+)
/// which aren't featured in monospace fonts. Emoji glyphs are never
/// rescaled. This is an important feature for achieving GB18030 compliance.
/// <br /><br />
/// Note that this doesn't work with the DOM renderer. The default is false.
/// </summary>
[JsonPropertyName("rescaleOverlappingGlyphs")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? RescaleOverlappingGlyphs { get; set; }

/// <summary>
/// The type of renderer to use, this allows using the fallback DOM renderer
/// when canvas is too slow for the environment. The following features do
Expand Down
2 changes: 1 addition & 1 deletion XtermBlazor/XtermBlazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Description>Brings xterm.js to Blazor</Description>
<PackageIcon>icon.png</PackageIcon>
<Version>2.0.0</Version>
<Version>2.1.0</Version>
<PackageTags>xterm, xterm-js, blazor, blazor-server, blazor-webassembly, blazor-wasm,
xtermblazor</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down

0 comments on commit d5b64e5

Please sign in to comment.