Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Enso Font #7516

Merged
merged 18 commits into from
Aug 17, 2023
Merged
14 changes: 12 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions app/gui/view/documentation/assets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
padding-bottom: 0.5rem;
}

.enso-docs code {
font-family: EnsoRegular;
}

/* It's better to use `.unordered-list` class here instead of `ul`, but it will break the keyed lists that a provided by the engine.
* We need a separate way to represent keyed lists without embedded HTML tags. */
.enso-docs ul {
Expand Down Expand Up @@ -196,6 +200,7 @@ div.enso-docs .marked-icon-info {
}

.enso-docs .example {
font-family: EnsoRegular;
white-space: pre;
overflow-x: auto;
margin: 0.05rem 0.1rem;
Expand Down
9 changes: 3 additions & 6 deletions app/gui/view/documentation/src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,10 @@ fn list_of_examples<'a>(examples: &'a Examples) -> Box<dyn Render + 'a> {
}
}

/// Build an HTML code of the example from the documentation section. Engine already provides as
/// with a preformatted HTML code, but we need to modify some tags in order to properly style it.
fn example_from_doc_section(doc_section: &DocSection) -> String {
fn example_from_doc_section(doc_section: &DocSection) -> &str {
match doc_section {
DocSection::Marked { mark: Mark::Example, body, .. } =>
body.replace("<pre>", "<div class=\"example\">").replace("</pre>", "</div>"),
_ => String::from("Invalid example"),
DocSection::Marked { mark: Mark::Example, body, .. } => body,
_ => "Invalid example",
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl Model {
dom.dom().set_attribute_or_warn("class", "visualization scrollable");
dom.dom().set_style_or_warn("overflow-x", "hidden");
dom.dom().set_style_or_warn("overflow-y", "auto");
dom.dom().set_style_or_warn("font-family", "DejaVuSansMonoBook");
dom.dom().set_style_or_warn("font-family", "EnsoRegular");
dom.dom().set_style_or_warn("font-size", "12px");
dom.dom().set_style_or_warn("border-radius", "14px");
dom.dom().set_style_or_warn("padding-left", &padding_text);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl SpanWidget for Widget {

let ext = ctx.get_extension_or_default::<Extension>();
let bold = ext.bold || is_placeholder;
let text_weight = bold.then_some(text::Weight::Bold);
let text_weight = bold.then_some(text::Weight::ExtraBold);

let input = &self.frp.public.input;
input.content.emit(content);
Expand Down
1 change: 0 additions & 1 deletion app/ide-desktop/lib/content/esbuild-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export function bundlerOptions(args: Arguments) {
pathModule.resolve(THIS_PATH, 'src', 'index.html'),
pathModule.resolve(THIS_PATH, 'src', 'run.js'),
pathModule.resolve(THIS_PATH, 'src', 'style.css'),
pathModule.resolve(THIS_PATH, 'src', 'docsStyle.css'),
pathModule.resolve(THIS_PATH, 'src', 'serviceWorker.ts'),
...wasmArtifacts.split(pathModule.delimiter),
...fsSync
Expand Down
201 changes: 0 additions & 201 deletions app/ide-desktop/lib/content/src/docsStyle.css

This file was deleted.

Loading
Loading