Separate the fonts from the lcars-sdk.css file #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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