BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

admonitions isn't displaying properly #2083

Closed ghost closed 6 years ago

ghost commented 6 years ago

Current behavior

adomonition

Console

add

Expected behavior

image

Environment

FistfulOfStars commented 6 years ago

This appears to be working as expected on Linux.

Boostnote 11.6 Linux Mint 18.3 Cinnamon

untitled

ndbeals commented 6 years ago

I'm getting the same errors as @OnlineVagrant

Environment

fourells5 commented 6 years ago

Same experience as @OnlineVagrant and @ndbeals. Works as expected in Linux Mint 18.3.

zacharyrs commented 6 years ago

Also seems to work as expected on macOS - guess a Windows issue?

TobseF commented 6 years ago

Same Problem here.. The Problem is the missing font on Windows. You can fix it by download and install: MaterialIcons-Regular.ttf. So Boostnote should deliver this Material Icons font during install.

ndbeals commented 6 years ago

Following the evidence provided by @TobseF, I went a little further and I think I've isolated the issue.

The path that BoostNote uses to try and load the MaterialIcons fonts gets mangled on Windows.

Here's the mangled path: image

Here's a proper path used for loading the Lato font (both these fonts are loaded in the same place/chunk of code): image

I believe it's this file that is responsible for the loading of these fonts. If it is, the only difference I can see between the successfull Lato loading and the unsuccessful MaterialIcons loading is that the font src definition for MaterialIcons contains:

local('Material Icons'),
local('MaterialIcons-Regular'),

I'll attempt to fix this when I get home and open a pull request, though that may take a little while as I haven't built or developed for Boostnote before, so there's a learning curve to overcome there first. If anyone else wants to fix this first, please do.

johannbre commented 6 years ago

I've already attempted to fix the problem in this pull request: link I suspect now that it might not fix all cases, however. Will also have a look tonight when I have access to a windows machine.

ndbeals commented 6 years ago

@johannbre won't that string replace affect already valid filepaths, such as the path to the Lato font?

johannbre commented 6 years ago

@ndbeals no, it won't. The loading of the Lato fonts in MarkdownPreview.js is also broken. It just seems to work when you look at the network activity in developer tools because those fonts get loaded in other places. I've pushed another update to my previous commit which seems to fix the problem properly when I test on Windows and macOS.

commit link

IssueHuntBot commented 6 years ago

@boostio funded this issue with $20. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@johannbre has started working. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@johannbre has submitted output. Visit this issue on Issuehunt

IssueHuntBot commented 6 years ago

@kazup01 has rewarded. Visit this issue on Issuehunt

jaepetto commented 6 years ago

Same kind of issue on macOS. All admonitions are not displaying properly: image

fourells5 commented 6 years ago

Same issue--exactly as illustrated by jaepetto--on Windows 10 and Linux Mint 19 (Cinnamon desktop).

ehhc commented 6 years ago

@jaepetto @fourells5 the current issue is not related with this bug but with this: https://github.com/BoostIO/Boostnote/issues/2379 There is also already a PR (trying to) fix it :)

@kazup01 do you mind closing this old issue? :)