Skip to content

Commit

Permalink
Merge pull request #62 from grueneschweiz/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
cyrillbolliger authored Jun 14, 2023
2 parents a8811d2 + 0cb4f74 commit f8074ba
Show file tree
Hide file tree
Showing 5 changed files with 577 additions and 3,394 deletions.
4 changes: 2 additions & 2 deletions app/Logo/Verdi.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function getLogoIdentifier(int $width): string

protected function getRelSublineOffsetX(): float
{
return 32;
return 35.5;
}

protected function getRelSublineOffsetY(): float
Expand All @@ -35,7 +35,7 @@ protected function getAbsBaseLogoPath(): string

protected function getSublineFontSize(): float
{
return 7.35;
return 8.25;
}

protected function getTestOverlayPath(): ?string
Expand Down
11 changes: 6 additions & 5 deletions docs/logo.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
# How to Add a Base Logo

## The 100 simple steps ;)
* Generate a dark and a light SVG of the logo and store it in

* Generate a dark and a light SVG of the logo and store it in
`storage/app/base_logos/<logo-name>-<light|dark>.svg`
* Store the logo template files for download (vector files) in
`storage/app/vector_logo_templates/<logo-name>`
* Create a logo class that implements `App\Logo\LogoCompositor` in `app/Logo`.
Name the class after your logo.
* Register the logo class in the `app/Logo/LogoFactory.php`
* Add the logo settings to the `LogoTypes` and `LogoSublineRatios` constants in
* Add the logo settings to the `LogoTypes` and `LogoTypeRatios` constants in
`resources/js/service/canvas/Constants.js`
* Add the logo settings to the `LogoTypeRatios` in
`resources/js/service/canvas/elements/Logo.js`
* Add the logo type to the `types` property of `data()` in
`js/components/molecules/MLogoForm.vue`

## Common issues
- SVGs that use a clip path don't work well with the current version of image

- SVGs that use a clip path don't work well with the current version of image
magick. In case your image has a width <= 1 after trimming, try to remove
the clip path.

## Todo

Refactor the logo handling, so adding a logo isn't such a pain anymore.
Loading

0 comments on commit f8074ba

Please sign in to comment.