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

Eagle 1222 #683

Merged
merged 6 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/GraphRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ export class GraphRenderer {

static SCREEN_TO_GRAPH_POSITION_X(x:number) : number {
const eagle = Eagle.getInstance();
if(x===null){
if(x===null && GraphRenderer.dragCurrentPosition){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Potential issue with null check.

The condition x===null && GraphRenderer.dragCurrentPosition might not cover all edge cases. Consider checking if GraphRenderer.dragCurrentPosition is defined before accessing its properties.

x = GraphRenderer.dragCurrentPosition.x
}
return x/eagle.globalScale() - eagle.globalOffsetX();
Expand Down
28 changes: 21 additions & 7 deletions static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ body {
/* zoom: 75%; */
}

* {
font-family: Ubuntu Sans;
font-style: normal;
font-weight:400;
}

#graphArea {
/*background-color: rgb(222,222,222);*/
height: calc(100% - 82px);
Expand Down Expand Up @@ -70,6 +76,14 @@ body {
border-color: red;
}

.navbar .dropdown-item{
padding: .05rem 1rem;
Comment on lines +79 to +80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Padding value might be too small.

The padding value of .05rem might be too small and could lead to rendering issues on some devices. Consider increasing it slightly.

Suggested change
.navbar .dropdown-item{
padding: .05rem 1rem;
.navbar .dropdown-item{
padding: .25rem 1rem;
}

}

.navbar .dropdown-divider{
margin:.3rem 0;
}

#checkGraphWarnings span{
top: -3px;
}
Expand Down Expand Up @@ -2217,7 +2231,7 @@ ul.nav.navbar-nav .dropdown-item:hover{

.translationDefault{
position:absolute;
top: 5px;
top: 4px;
left:10px;
z-index: 99;
}
Expand Down Expand Up @@ -2383,7 +2397,7 @@ ul.nav.navbar-nav .dropdown-item:hover{
width: 100%;
height:26px;
background-color: #002349;
padding: 0px 16px;
padding: 1px 9px;
position: fixed;
z-index: 0;
}
Expand Down Expand Up @@ -2675,31 +2689,31 @@ palette-component input.form-control.selected {
.tooltip-inner h1 {
font-size: 1.4rem;
font-weight: 600;
margin: 0px;
margin: 5px 0px;
}

.tooltip-inner h2 {
font-size: 1.3rem;
font-weight: 600;
margin: 0px;
margin: 5px 0px;
}

.tooltip-inner h3 {
font-size: 18px;
font-weight: 600;
margin: 0px;
margin: 5px 0px;
}

.tooltip-inner h4 {
font-size: 1.1rem;
font-weight: 600;
margin: 0px;
margin: 5px 0px;
}

.tooltip-inner h5 {
font-size: 1rem;
font-weight: 600;
margin: 0px;
margin: 5px 0px;
}

.tooltip-inner strong{
Expand Down
144 changes: 144 additions & 0 deletions static/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,150 @@
url(fonts/ComicNeue-Light.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 100;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Thin.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 100;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-ThinItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 200;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-ExtraLight.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 200;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-ExtraLightItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 300;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Light.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 300;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-LightItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 400;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Regular.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 400;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Italic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 500;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Medium.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 500;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-MediumItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 600;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-SemiBold.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 600;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-SemiBoldItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 700;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-Bold.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 700;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-BoldItalic.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: normal;
font-weight: 800;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-ExtraBold.ttf) format('truetype')
}

@font-face {
font-family: 'Ubuntu Sans';
font-style: italic;
font-weight: 800;
font-display: swap;
src:
url(fonts/Ubuntu_Sans/static/UbuntuSans-ExtraBoldItalic.ttf) format('truetype')
}

@font-face {
font-family: 'icomoon';
src: url('fonts/icomoon.eot?f4xfc8');
Expand Down
112 changes: 112 additions & 0 deletions static/fonts/Ubuntu_Sans/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
Ubuntu Sans Variable Font
=========================

This download contains Ubuntu Sans as both variable fonts and static fonts.

Ubuntu Sans is a variable font with these axes:
wdth
wght

This means all the styles are contained in these files:
UbuntuSans-VariableFont_wdth,wght.ttf
UbuntuSans-Italic-VariableFont_wdth,wght.ttf

If your app fully supports variable fonts, you can now pick intermediate styles
that aren’t available as static fonts. Not all apps support variable fonts, and
in those cases you can use the static font files for Ubuntu Sans:
static/UbuntuSans_Condensed-Thin.ttf
static/UbuntuSans_Condensed-ExtraLight.ttf
static/UbuntuSans_Condensed-Light.ttf
static/UbuntuSans_Condensed-Regular.ttf
static/UbuntuSans_Condensed-Medium.ttf
static/UbuntuSans_Condensed-SemiBold.ttf
static/UbuntuSans_Condensed-Bold.ttf
static/UbuntuSans_Condensed-ExtraBold.ttf
static/UbuntuSans_SemiCondensed-Thin.ttf
static/UbuntuSans_SemiCondensed-ExtraLight.ttf
static/UbuntuSans_SemiCondensed-Light.ttf
static/UbuntuSans_SemiCondensed-Regular.ttf
static/UbuntuSans_SemiCondensed-Medium.ttf
static/UbuntuSans_SemiCondensed-SemiBold.ttf
static/UbuntuSans_SemiCondensed-Bold.ttf
static/UbuntuSans_SemiCondensed-ExtraBold.ttf
static/UbuntuSans-Thin.ttf
static/UbuntuSans-ExtraLight.ttf
static/UbuntuSans-Light.ttf
static/UbuntuSans-Regular.ttf
static/UbuntuSans-Medium.ttf
static/UbuntuSans-SemiBold.ttf
static/UbuntuSans-Bold.ttf
static/UbuntuSans-ExtraBold.ttf
static/UbuntuSans_Condensed-ThinItalic.ttf
static/UbuntuSans_Condensed-ExtraLightItalic.ttf
static/UbuntuSans_Condensed-LightItalic.ttf
static/UbuntuSans_Condensed-Italic.ttf
static/UbuntuSans_Condensed-MediumItalic.ttf
static/UbuntuSans_Condensed-SemiBoldItalic.ttf
static/UbuntuSans_Condensed-BoldItalic.ttf
static/UbuntuSans_Condensed-ExtraBoldItalic.ttf
static/UbuntuSans_SemiCondensed-ThinItalic.ttf
static/UbuntuSans_SemiCondensed-ExtraLightItalic.ttf
static/UbuntuSans_SemiCondensed-LightItalic.ttf
static/UbuntuSans_SemiCondensed-Italic.ttf
static/UbuntuSans_SemiCondensed-MediumItalic.ttf
static/UbuntuSans_SemiCondensed-SemiBoldItalic.ttf
static/UbuntuSans_SemiCondensed-BoldItalic.ttf
static/UbuntuSans_SemiCondensed-ExtraBoldItalic.ttf
static/UbuntuSans-ThinItalic.ttf
static/UbuntuSans-ExtraLightItalic.ttf
static/UbuntuSans-LightItalic.ttf
static/UbuntuSans-Italic.ttf
static/UbuntuSans-MediumItalic.ttf
static/UbuntuSans-SemiBoldItalic.ttf
static/UbuntuSans-BoldItalic.ttf
static/UbuntuSans-ExtraBoldItalic.ttf

Get started
-----------

1. Install the font files you want to use

2. Use your app's font picker to view the font family and all the
available styles

Learn more about variable fonts
-------------------------------

https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
https://variablefonts.typenetwork.com
https://medium.com/variable-fonts

In desktop apps

https://theblog.adobe.com/can-variable-fonts-illustrator-cc
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts

Online

https://developers.google.com/fonts/docs/getting_started
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts

Installing fonts

MacOS: https://support.apple.com/en-us/HT201749
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows

Android Apps

https://developers.google.com/fonts/docs/android
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts

License
-------
Please read the full license text (UFL.txt) to understand the permissions,
restrictions and requirements for usage, redistribution, and modification.

You can use them in your products & projects – print or digital,
commercial or otherwise.

This isn't legal advice, please consider consulting a lawyer and see the full
license for all details.
Loading