LCARS-SDK icon indicating copy to clipboard operation
LCARS-SDK copied to clipboard

Separate the fonts from the lcars-sdk.css file

Open sfranzyshen opened this issue 5 years ago • 0 comments

We propose moving the @font-face declaration from the lcars-sdk.css file and into a new file located within the fonts folder. This way it won't matter where the file is called from relative to the font files. With the current method the declarations reference the font files with a preceding "../fonts/" this creates a dependency to the file system hierarchy relative to the referenced font files. When deploying with the full sdk file system layout ... this isn't a problem ... but alternate deployments are restricted or not possible.
For example we are deploying on a rpi4 running chrome browser ... so we don't need all the fonts for our deployment. In fact we use base64 embedded fonts so we we don't need font files at all ... and we have the entire lcars-sdk deployed as just two files. We provided a comparison between the two methods below. the first version is all default (except for separating the font declarations from the lcars-sdk.css file) The second version is our slimmed down minimized deployment ... We have also included images comparing the profiling (loading of the page performance chart) for both methods ... as you can see there is a good deal of performance increase and reduced load time ... so this is our reasoning and justification for separating the fonts from the lcars-sdk.css file and into a separate file ...

Default

https://sfranzyshen.github.io/LCARS-SDK-ARCHIVE/19182.4/interfaces/color-generator/index.html https://sfranzyshen.github.io/LCARS-SDK-ARCHIVE/19182.4/interfaces/color-generator/index.png

Embedded

https://sfranzyshen.github.io/LCARS-SDK-ARCHIVE/19182.4/interfaces/color-generator/color-generator.html https://sfranzyshen.github.io/LCARS-SDK-ARCHIVE/19182.4/interfaces/color-generator/color-generator.png

  • please allow six weeks for your delivery Thank You

sfranzyshen avatar Jul 07 '19 22:07 sfranzyshen