Skip to content

Commit

Permalink
[feature] add files
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Mar 20, 2022
1 parent 914b990 commit 10b3970
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
logos/

logo_base_black.svg
logo_base_white.svg
logo_base_white-colored.svg
logo_base.svg
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
entry=logo_base
finalName=forum_logo
size=2048
options=--export-plain-svg
var_white_colored=_white-colored
var_white=_white
var_black=_black

all: dir generate normal white-colored white black grayscale

dir:
mkdir -p logos

generate:
python3 generate.py

normal:
inkscape $(options) $(entry).svg --export-text-to-path -o logos/$(finalName).svg
inkscape $(options) -w $(size) -h $(size) logos/$(finalName).svg -o logos/$(finalName)$(size)px.png

white-colored:
inkscape $(options) $(entry)$(var_white_colored).svg --export-text-to-path -o logos/$(finalName)$(var_white_colored).svg
inkscape $(options) -w $(size) -h $(size) logos/$(finalName)$(var_white_colored).svg -o logos/forum$(var_white_colored)_logo$(size)px.png
inkscape $(options) -b "#000000" -w $(size) -h $(size) logos/$(finalName)$(var_white_colored).svg -o logos/forum$(var_white_colored)_black_logo$(size)px.png

black:
inkscape $(options) $(entry)$(var_black).svg --export-text-to-path -o logos/$(finalName)$(var_black).svg
inkscape $(options) -w $(size) -h $(size) logos/$(finalName)$(var_black).svg -o logos/forum$(var_black)_logo$(size)px.png
inkscape $(options) -b "#FFFFFF" -w $(size) -h $(size) logos/$(finalName)$(var_black).svg -o logos/forum$(var_black)_white_logo$(size)px.png

white:
inkscape $(options) $(entry)$(var_white).svg --export-text-to-path -o logos/$(finalName)$(var_white).svg
inkscape $(options) -w $(size) -h $(size) logos/$(finalName)$(var_white).svg -o logos/forum$(var_white)_logo$(size)px.png
inkscape $(options) -b "#000000" -w $(size) -h $(size) logos/$(finalName)$(var_white).svg -o logos/forum$(var_white)_black_logo$(size)px.png

grayscale:
convert logos/$(finalName)$(size)px.png -colorspace Gray logos/forum_grayscale_logo$(size)px.png
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Logos

## Note

Never use the `logo_base.template` because it use a special font and it is a template ! You need to convert the logo to a formatted svg file (where the `text` is transformed to `path`).

## Create logos

Install the font `Montserrat SemiBold`

- [https://fr.ffonts.net/Montserrat-SemiBold.font](https://fr.ffonts.net/Montserrat-SemiBold.font)
- [https://github.com/JulietaUla/Montserrat](https://github.com/JulietaUla/Montserrat)

Have `inkscape` and `convert` installed.

If you want, change size of the logo in the Makefile.

Run commands :

```sh
make
```
46 changes: 46 additions & 0 deletions generate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
logos_to_create = [
{
'name': 'logo_base.svg',
'color-1': '#b50c36',
'color-2': 'black',
'color-3': '#aaaaaa',
'color-4': 'black',
},
{
'name': 'logo_base_white.svg',
'color-1': 'white',
'color-2': 'white',
'color-3': 'white',
'color-4': 'white',
},
{
'name': 'logo_base_white-colored.svg',
'color-1': '#b50c36',
'color-2': 'white',
'color-3': '#aaaaaa',
'color-4': 'white',
},
{
'name': 'logo_base_black.svg',
'color-1': 'black',
'color-2': 'black',
'color-3': 'black',
'color-4': 'black',
},
]

name = "logo_base.template"


a = logos_to_create[0]
for one_logo in logos_to_create:
with open(name, "r") as f:
filedata = f.read()

filedata = filedata.replace('color-1', one_logo["color-1"])
filedata = filedata.replace('color-2', one_logo["color-2"])
filedata = filedata.replace('color-3', one_logo["color-3"])
filedata = filedata.replace('color-4', one_logo["color-4"])

with open(one_logo["name"], 'w') as file:
file.write(filedata)
30 changes: 30 additions & 0 deletions logo_base.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<svg viewBox="-65 -220 2500 2500" xmlns="http://www.w3.org/2000/svg">
<metadata xmlns="http://www.w3.org/2000/svg">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description dc:title="Logo Forum Télécom Paris">
<dc:creator>
<rdf:Bag>
<rdf:li>Forum Télécom Paris</rdf:li>
</rdf:Bag>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</metadata>
<polygon fill="color-1" points="1055,0 800,148 1055,297 1312,148" />
<polygon fill="color-2" points="595,223 519,520 233,595 308,309" />
<polygon fill="color-3" points="149,800 0,1055 148,1312 297,1055" />
<polygon fill="color-1" points="234,1517 308,1803 595,1878 519,1592" />
<polygon fill="color-2" points="800,1964 1056,2111 1311,1964 1056,1815" />
<g font-family="Montserrat Semibold" fill="color-4" font-size="380">
<text x="745" y="745">
Forum
</text>
<text x="745" y="1188">
Télécom
</text>
<text x="745" y="1630">
Paris
</text>
</g>
</svg>

0 comments on commit 10b3970

Please sign in to comment.