Skip to content

Fixes 3803 #3804

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

Merged
merged 5 commits into from
Dec 30, 2019
Merged

Fixes 3803 #3804

merged 5 commits into from
Dec 30, 2019

Conversation

hSaria
Copy link
Contributor

@hSaria hSaria commented Dec 29, 2019

Fixes: #3803

Replaced the current PNG logo (raster-based) with an SVG one (vector-based).

I kept the old logo, but I don't think it is being referenced anymore.

@jeremystretch
Copy link
Member

Looks great! One minor issue: in netbox_logo.svg, the text appears to be aligned along the top of the image, rather centered vertically with the icon. (Or, the bottom of the text is aligned along the vertical center of the image. I can't really tell.) Do you see this as well?

netbox_logo

@hSaria
Copy link
Contributor Author

hSaria commented Dec 30, 2019

That's odd. Which platform (OS and web browser) are you on? I don't think I used anything new or special in the SVG, but perhaps I did.

@jeremystretch
Copy link
Member

jeremystretch commented Dec 30, 2019

This is using Firefox on Linux Mint. I see the same thing when viewing the SVG code on JSFiddle.

Edit: Renders correctly on Chrome.

@jeremystretch
Copy link
Member

This looks relevant.

@hSaria
Copy link
Contributor Author

hSaria commented Dec 30, 2019

alignment-baseline is set to middle but maybe that has limited supported.

@hSaria
Copy link
Contributor Author

hSaria commented Dec 30, 2019

This works on FireFox, though I'm gonna test it on other platforms too given the unknown support for alignment-baseline and dominant-baseline.

@hSaria
Copy link
Contributor Author

hSaria commented Dec 30, 2019

I could just use path instead of text for "netbox" which will two-birds-one-stone it:

  • People that don't have the Avenir font won't see the fallback fonts
  • Won't have to rely on alignment-baseline nor dominant-baseline to positing "netbox"

The downside is that changing the "font" won't be as easy as it would've gotten converted to a path.

@hSaria
Copy link
Contributor Author

hSaria commented Dec 30, 2019

How about this? Had to play around, but got it working with the help of text-to-svg and some "finesse," if you will.

TextToSVG = require('text-to-svg');
textToSVG = TextToSVG.loadSync('Avenir-Heavy-05.ttf');

console.log(textToSVG.getD('netbox', {fontSize: 200, anchor: 'top', letterSpacing: 0.02}));

This should work everywhere as it's only built with circles, rectangles, and paths (all widely compatible).

@jeremystretch
Copy link
Member

Can't say I have a strong opinion either way, so long as it's widely supported. I do like that the path approach ensures consistency regardless of installed fonts.

@jeremystretch
Copy link
Member

Let's go with the path approach for now. We can always revert to the text approach later on if needed for some reason.

@jeremystretch jeremystretch merged commit ea2351e into netbox-community:develop Dec 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace logo image with SVG
2 participants