base added

This commit is contained in:
ed barz 2023-05-18 00:29:58 +02:00
parent 83616ccaa1
commit 8cde0873d2
208 changed files with 1492 additions and 0 deletions

View File

@ -0,0 +1,68 @@
import os
import re
# Directory with the font files
directory = './'
# Get list of font files
font_files = os.listdir(directory)
# Initialize an empty list for the typefaces
typefaces = []
# Loop over the font files
for file in font_files:
# Strip the file extension
name_weight, extension = os.path.splitext(file)
# Only process .ttf, .otf, .woff and .woff2 files
if extension.lower() not in ['.ttf', '.otf', '.woff', '.woff2']:
continue
# Split the name and weight
match = re.match(r'(.*)_(\d+)(I)?', name_weight)
if match:
name, weight, is_italic = match.groups()
else:
name = name_weight
weight = "400"
is_italic = None
# Check if the typeface is already in the list
for typeface in typefaces:
if typeface['name'] == name:
break
else:
# If the typeface is not in the list, add a new one
typeface = {
"name": name,
"fonts" : [],
"tags" : ["sans-serif"],
}
typefaces.append(typeface)
# Add file to the typeface
font_descriptor = {
'weight': weight,
'style': 'italic' if is_italic else 'normal',
'file': file,
'format': 'truetype' if extension == '.ttf' else 'opentype' if extension == '.otf' else 'woff' if extension == '.woff' else 'woff2'
}
typeface['fonts'].append(font_descriptor)
# Create CSS files
for typeface in typefaces:
css_content = ''
for font in typeface['fonts']:
css_content += f"""
@font-face {{
font-family: '{typeface["name"]}';
src: url('{font["file"]}') format('{font["format"]}');
font-weight: {font["weight"]};
font-style: {font["style"]};
}}
"""
with open(f'{typeface["name"].lower()}.css', 'w') as f:
f.write(css_content)

View File

@ -0,0 +1,64 @@
import os
import re
# Directory with the font files
directory = './'
# Get list of font files
font_files = os.listdir(directory)
# Initialize an empty list for the typefaces
typefaces = []
# Loop over the font files
for file in font_files:
# Strip the file extension
name_weight, extension = os.path.splitext(file)
# Only process .ttf, .otf, .woff and .woff2 files
if extension.lower() not in ['.ttf', '.otf', '.woff', '.woff2']:
continue
# Split the name and weight
match = re.match(r'(.*)_(\d+)(I)?', name_weight)
if match:
name, weight, is_italic = match.groups()
else:
name = name_weight
weight = "400"
is_italic = None
# Check if the typeface is already in the list
for typeface in typefaces:
if typeface['name'] == name:
break
else:
# If the typeface is not in the list, add a new one
typeface = {
"name": name,
"fonts" : [],
"tags" : ["sans-serif"],
}
typefaces.append(typeface)
font_descriptor = weight + ('i' if is_italic else '')
typeface['fonts'].append(font_descriptor)
# Convert the typefaces list to a JavaScript object string
typefaces_js = '[\n' + ',\n'.join(
f' {typeface["name"].lower()} : ' +
'{\n' +
f' "name": "{typeface["name"]}",\n' +
' "fonts" : [\n' +
',\n'.join(
f' "{font_descriptor}"'
for font_descriptor in typeface['fonts']
) +
'\n ],\n' +
' "tags" : ["sans-serif"],\n' +
' }'
for typeface in typefaces
) + '\n]'
# Write the JavaScript string to a .js file
with open('00_typefaces.js', 'w') as f:
f.write('var typeFaces = ' + typefaces_js + ';')

680
fonts/base/00_typefaces.js Normal file
View File

@ -0,0 +1,680 @@
var typeFaces = [
planck : {
"name": "Planck",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
bizon : {
"name": "Bizon",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
inter : {
"name": "Inter",
"fonts" : [
"600",
"100i",
"700",
"600i",
"700i",
"500",
"400",
"800",
"800i",
"900i",
"200i",
"300i",
"100",
"900",
"200",
"500i",
"400i",
"300"
],
"tags" : ["sans-serif"],
},
laborunionsoft : {
"name": "LaborUnionSoft",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
overpass : {
"name": "Overpass",
"fonts" : [
"400",
"600i",
"600",
"200i",
"800i",
"200",
"400i",
"800"
],
"tags" : ["sans-serif"],
},
mersad : {
"name": "Mersad",
"fonts" : [
"400",
"600",
"200",
"700",
"500",
"100",
"300",
"900",
"800"
],
"tags" : ["sans-serif"],
},
leaguegothiccondensed : {
"name": "LeagueGothicCondensed",
"fonts" : [
"400i",
"400"
],
"tags" : ["sans-serif"],
},
disket : {
"name": "Disket",
"fonts" : [
"400",
"600"
],
"tags" : ["sans-serif"],
},
mononoki : {
"name": "Mononoki",
"fonts" : [
"600i",
"400i",
"600",
"400"
],
"tags" : ["sans-serif"],
},
margaret : {
"name": "Margaret",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
gulfsdisplay : {
"name": "GulfsDisplay",
"fonts" : [
"600i",
"800i",
"400i",
"800",
"200i",
"200",
"500i",
"600",
"400",
"300",
"500",
"300i"
],
"tags" : ["sans-serif"],
},
hermit : {
"name": "Hermit",
"fonts" : [
"600i",
"400i",
"200i",
"200",
"400",
"600"
],
"tags" : ["sans-serif"],
},
avenirnext : {
"name": "AvenirNext",
"fonts" : [
"200",
"300",
"200i",
"300i",
"800i",
"100",
"500i",
"400i",
"800",
"500",
"100i",
"400",
"600",
"700",
"600i",
"700i"
],
"tags" : ["sans-serif"],
},
mamenchisa : {
"name": "Mamenchisa",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
avara : {
"name": "Avara",
"fonts" : [
"400",
"400i"
],
"tags" : ["sans-serif"],
},
remboy : {
"name": "Remboy",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
hermanoaltoround : {
"name": "HermanoAltoRound",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
mdtall : {
"name": "MDTall",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
vollkorn : {
"name": "Vollkorn",
"fonts" : [
"200i",
"800i",
"800",
"400i",
"200",
"600",
"400",
"600i"
],
"tags" : ["sans-serif"],
},
quakep : {
"name": "Quakep",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
ribes : {
"name": "Ribes",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
refuse : {
"name": "Refuse",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
blazed : {
"name": "Blazed",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
comictantrum : {
"name": "ComicTantrum",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
doppelganger : {
"name": "Doppelganger",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
communenuitdeboutpochoir : {
"name": "CommuneNuitDeboutPochoir",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
alvania : {
"name": "Alvania",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
lemonmilk : {
"name": "LemonMilk",
"fonts" : [
"500i",
"400",
"600i",
"600",
"400i",
"200",
"500",
"200i"
],
"tags" : ["sans-serif"],
},
feastofflesh : {
"name": "FeastOfFlesh",
"fonts" : [
"400",
"400i"
],
"tags" : ["sans-serif"],
},
axis : {
"name": "Axis",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
ustroke : {
"name": "Ustroke",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
rousseaudeco : {
"name": "RousseauDeco",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
roboto : {
"name": "Roboto",
"fonts" : [
"200",
"400",
"600",
"800",
"600i",
"800i",
"400i",
"200i"
],
"tags" : ["sans-serif"],
},
vercetti : {
"name": "Vercetti",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
marvinvisionsbig : {
"name": "MarvinVisionsBig",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
ambidexter : {
"name": "Ambidexter",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
montreau : {
"name": "Montreau",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
theater : {
"name": "Theater",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
surfingcapital : {
"name": "SurfingCapital",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
boston : {
"name": "Boston",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
cherish : {
"name": "Cherish",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
catreporter : {
"name": "CATReporter",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
wavehaus : {
"name": "Wavehaus",
"fonts" : [
"800",
"400",
"600",
"200",
"500",
"100"
],
"tags" : ["sans-serif"],
},
humane : {
"name": "Humane",
"fonts" : [
"800",
"400",
"600",
"200",
"500",
"100",
"300"
],
"tags" : ["sans-serif"],
},
trappist : {
"name": "Trappist",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
forta : {
"name": "Forta",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
hamlettertia : {
"name": "HamletTertia",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
nim : {
"name": "NIM",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
canobis : {
"name": "Canobis",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
werbedeutsch : {
"name": "Werbedeutsch",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
donjose : {
"name": "DonJose",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
milkcarton : {
"name": "MilkCarton",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
envy code r : {
"name": "Envy Code R",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
mammutcat : {
"name": "MammutCAT",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
rafigen : {
"name": "Rafigen",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
communenuitdebout : {
"name": "CommuneNuitDebout",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
sonderregular : {
"name": "SonderRegular",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
baldur : {
"name": "Baldur",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
banco : {
"name": "Banco",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
overpassmono : {
"name": "OverpassMono",
"fonts" : [
"400",
"600"
],
"tags" : ["sans-serif"],
},
monolith : {
"name": "Monolith",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
arturito : {
"name": "Arturito",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
saintregus : {
"name": "SaintRegus",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
tropikal : {
"name": "Tropikal",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
bondi : {
"name": "Bondi",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
tintin : {
"name": "Tintin",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
laborunion : {
"name": "LaborUnion",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
newake : {
"name": "Newake",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
blankenburg : {
"name": "Blankenburg",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
leaguegothic : {
"name": "LeagueGothic",
"fonts" : [
"400i",
"400"
],
"tags" : ["sans-serif"],
},
volumedealer : {
"name": "VolumeDealer",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
kielo : {
"name": "Kielo",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
harbinger : {
"name": "Harbinger",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
leiko : {
"name": "Leiko",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
theboldfont : {
"name": "TheBoldFont",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
grobedeutschmeister : {
"name": "GrobeDeutschmeister",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
imposible : {
"name": "Imposible",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
hamletcicero : {
"name": "HamletCicero",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
montrappist : {
"name": "MonTrappist",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
resin : {
"name": "Resin",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
misto : {
"name": "Misto",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
},
archive : {
"name": "Archive",
"fonts" : [
"400"
],
"tags" : ["sans-serif"],
}
];

BIN
fonts/base/Alvania.ttf Normal file

Binary file not shown.

BIN
fonts/base/Ambidexter.otf Normal file

Binary file not shown.

BIN
fonts/base/Archive.ttf Normal file

Binary file not shown.

BIN
fonts/base/Arturito.ttf Executable file

Binary file not shown.

BIN
fonts/base/Avara_400.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Avara_400I.woff2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/base/Axis.otf Normal file

Binary file not shown.

BIN
fonts/base/Baldur.ttf Normal file

Binary file not shown.

BIN
fonts/base/Banco.ttf Normal file

Binary file not shown.

BIN
fonts/base/Bizon.otf Normal file

Binary file not shown.

BIN
fonts/base/Blankenburg.ttf Normal file

Binary file not shown.

BIN
fonts/base/Blazed.ttf Normal file

Binary file not shown.

BIN
fonts/base/Bondi.otf Normal file

Binary file not shown.

BIN
fonts/base/Boston.ttf Executable file

Binary file not shown.

BIN
fonts/base/CATReporter.ttf Normal file

Binary file not shown.

BIN
fonts/base/Canobis.otf Executable file

Binary file not shown.

BIN
fonts/base/Cherish.ttf Normal file

Binary file not shown.

BIN
fonts/base/ComicTantrum.otf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/base/Disket_400.ttf Normal file

Binary file not shown.

BIN
fonts/base/Disket_600.ttf Normal file

Binary file not shown.

BIN
fonts/base/DonJose.otf Normal file

Binary file not shown.

BIN
fonts/base/Doppelganger.otf Normal file

Binary file not shown.

BIN
fonts/base/EnvyCodeR.ttf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/base/Forta.woff2 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
fonts/base/HamletCicero.otf Normal file

Binary file not shown.

BIN
fonts/base/HamletTertia.otf Normal file

Binary file not shown.

BIN
fonts/base/Harbinger.otf Normal file

Binary file not shown.

Binary file not shown.

BIN
fonts/base/Hermit_200.otf Normal file

Binary file not shown.

BIN
fonts/base/Hermit_200I.otf Normal file

Binary file not shown.

BIN
fonts/base/Hermit_400.otf Normal file

Binary file not shown.

BIN
fonts/base/Hermit_400I.otf Normal file

Binary file not shown.

BIN
fonts/base/Hermit_600.otf Normal file

Binary file not shown.

BIN
fonts/base/Hermit_600I.otf Normal file

Binary file not shown.

BIN
fonts/base/Humane_100.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_200.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_300.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_400.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_500.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_600.ttf Normal file

Binary file not shown.

BIN
fonts/base/Humane_800.ttf Normal file

Binary file not shown.

BIN
fonts/base/Imposible.ttf Normal file

Binary file not shown.

BIN
fonts/base/Inter_100.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_100I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_200.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_200I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_300.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_300I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_400.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_400I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_500.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_500I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_600.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_600I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_700.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_700I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_800.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_800I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_900.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Inter_900I.woff2 Normal file

Binary file not shown.

BIN
fonts/base/Kielo.otf Normal file

Binary file not shown.

BIN
fonts/base/LaborUnion.otf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More