fix #13 makes anti-aliasing optional
This commit is contained in:
parent
334867dd46
commit
3c8bd225a7
16
index.html
16
index.html
|
@ -158,6 +158,10 @@
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
text-rendering: optimizeLegibility;
|
text-rendering: optimizeLegibility;
|
||||||
}
|
}
|
||||||
|
.CodeMirror.no-smooth {
|
||||||
|
font-smooth: never;
|
||||||
|
-webkit-font-smoothing : none;
|
||||||
|
}
|
||||||
.CodeMirror .cm-atom { font-style: italic; }
|
.CodeMirror .cm-atom { font-style: italic; }
|
||||||
.CodeMirror-gutters {
|
.CodeMirror-gutters {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
@ -221,7 +225,10 @@
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label for="size">Size</label>
|
<label for="size">Size</label>
|
||||||
<input onchange="setSize()" type="number" id="size" value="14">
|
<input onchange="setSize()" type="number" id="size" value="14">
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="aliasing">Anti-aliasing </label><input onchange="setAntialiasing()" type="checkbox" id="aliasing" checked>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<dix id="font-info"></dix>
|
<dix id="font-info"></dix>
|
||||||
|
@ -326,6 +333,13 @@ function updateGutters(cm) {
|
||||||
function setSize() {
|
function setSize() {
|
||||||
$(".CodeMirror").css({ fontSize: $("#size").val() + "px" });
|
$(".CodeMirror").css({ fontSize: $("#size").val() + "px" });
|
||||||
}
|
}
|
||||||
|
function setAntialiasing() {
|
||||||
|
if ($("#aliasing").is(":checked")) {
|
||||||
|
$(".CodeMirror").removeClass("no-smooth");
|
||||||
|
} else {
|
||||||
|
$(".CodeMirror").addClass("no-smooth");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue