diff --git a/README.md b/README.md index 5c6d249..574b02b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,60 @@ # rendercv-fonts -A Python package with some fonts for the `rendercv` package. \ No newline at end of file +A Python package with some fonts for the `rendercv` package. + +## Font Optimization for Web Use + +This repository includes a script to optimize fonts for web use. The script converts TTF fonts to WOFF2 format, which provides better compression and faster loading times. It can also subset fonts to include only the characters you need, further reducing file size. + +### Prerequisites + +- Python 3.10 or higher +- `fonttools` and `brotli` (the script will install these if they're not already installed) + +### Usage + +```bash +# Basic usage (converts all TTF fonts to WOFF2) +python optimize_fonts.py + +# Convert and subset fonts to include only Latin characters +python optimize_fonts.py --subset + +# Convert and subset fonts with custom character set +python optimize_fonts.py --subset --chars="U+0000-00FF,U+0131,U+0152-0153" + +# Specify custom input and output directories +python optimize_fonts.py --input=my_fonts --output=optimized_fonts +``` + +### Options + +- `--input`, `-i`: Input directory containing TTF fonts (default: "rendercv_fonts") +- `--output`, `-o`: Output directory for optimized fonts (default: "web_fonts") +- `--subset`, `-s`: Subset the fonts to reduce file size +- `--chars`, `-c`: Characters to include in subset (e.g., 'U+0000-00FF') +- `--css`: Path to generate CSS file (default: "web_fonts/fonts.css") + +### Web Font Best Practices + +1. **Use WOFF2 Format**: WOFF2 offers 30-50% better compression than TTF/OTF. +2. **Subset Fonts**: Only include the characters you need to reduce file size. +3. **Use Font Display**: The generated CSS includes `font-display: swap` for better loading behavior. +4. **Preload Critical Fonts**: Consider adding `` for critical fonts. +5. **Self-Host Fonts**: Self-hosting gives you more control over caching and performance. + +### Example CSS Usage + +```html + + +``` diff --git a/optimize_fonts.py b/optimize_fonts.py new file mode 100644 index 0000000..14d0a5d --- /dev/null +++ b/optimize_fonts.py @@ -0,0 +1,164 @@ +#!/usr/bin/env python3 +""" +Font optimization script for web use. +This script converts TTF fonts to WOFF2 format and optionally subsets them. +""" + +import os +import argparse +import subprocess +import pathlib +from concurrent.futures import ThreadPoolExecutor + +def ensure_tools_installed(): + """Check if required tools are installed.""" + try: + # Check for fonttools + subprocess.run(["pip", "show", "fonttools"], check=True, capture_output=True) + except subprocess.CalledProcessError: + print("Installing fonttools...") + subprocess.run(["pip", "install", "fonttools", "brotli"], check=True) + + print("All required tools are installed.") + +def convert_to_woff2(font_path, output_dir=None, subset=False, subset_chars=None): + """ + Convert a TTF font to WOFF2 format and optionally subset it. + + Args: + font_path: Path to the TTF font file + output_dir: Directory to save the optimized font (defaults to same directory) + subset: Whether to subset the font + subset_chars: Characters to include in the subset (defaults to Latin) + """ + font_path = pathlib.Path(font_path) + + if output_dir: + output_dir = pathlib.Path(output_dir) + output_dir.mkdir(parents=True, exist_ok=True) + else: + output_dir = font_path.parent + + output_path = output_dir / f"{font_path.stem}.woff2" + + # Base command for conversion + cmd = ["pyftsubset", str(font_path), f"--output-file={output_path}", "--flavor=woff2"] + + # Add subsetting parameters if requested + if subset: + # Default to Latin character set if not specified + if not subset_chars: + subset_chars = "U+0000-00FF" # Basic Latin + Latin-1 Supplement + cmd.append(f"--unicodes={subset_chars}") + else: + # If not subsetting, we need to use a different approach + cmd = ["fonttools", "ttLib.woff2", "compress", str(font_path), "-o", str(output_path)] + + try: + result = subprocess.run(cmd, check=True, capture_output=True, text=True) + print(f"Converted {font_path.name} to WOFF2 format at {output_path}") + return output_path + except subprocess.CalledProcessError as e: + print(f"Error converting {font_path.name}: {e.stderr}") + return None + +def process_font_directory(directory, output_dir=None, subset=False, subset_chars=None): + """Process all TTF and OTF fonts in a directory and organize them by family in the output directory.""" + directory = pathlib.Path(directory) + font_files = list(directory.glob("**/*.[to]tf")) # Include both TTF and OTF files + + if not font_files: + print(f"No TTF or OTF fonts found in {directory}") + return [] + + print(f"Found {len(font_files)} TTF/OTF fonts in {directory}") + + converted_files = [] + with ThreadPoolExecutor() as executor: + futures = [] + for font_path in font_files: + # Determine the family directory + family_dir = font_path.parent.relative_to(directory) + output_family_dir = output_dir / family_dir + output_family_dir.mkdir(parents=True, exist_ok=True) + + # Submit the conversion task + futures.append( + executor.submit(convert_to_woff2, font_path, output_family_dir, subset, subset_chars) + ) + + for future in futures: + result = future.result() + if result: + converted_files.append(result) + + return converted_files + +def generate_css(converted_files, output_file="fonts.css"): + """Generate a CSS file for the converted fonts.""" + output_file = pathlib.Path(output_file) + + css_content = """/* Optimized web fonts */ +""" + + # Group fonts by family + font_families = {} + for font_path in converted_files: + family_name = font_path.parent.name + if family_name not in font_families: + font_families[family_name] = [] + font_families[family_name].append(font_path) + + # Generate CSS for each font family + for family, fonts in font_families.items(): + css_content += f"\n/* {family} */\n" + + for font in fonts: + font_name = font.stem + font_style = "italic" if "italic" in font_name.lower() else "normal" + font_weight = "700" if "bold" in font_name.lower() else "400" + + css_content += f"""@font-face {{ + font-family: '{family}'; + src: url('{font.relative_to(output_file.parent)}') format('woff2'); + font-weight: {font_weight}; + font-style: {font_style}; + font-display: swap; +}} +""" + + with open(output_file, "w") as f: + f.write(css_content) + + print(f"Generated CSS file at {output_file}") + +def main(): + parser = argparse.ArgumentParser(description="Optimize fonts for web use") + parser.add_argument("--input", "-i", help="Input directory containing TTF fonts", default="rendercv_fonts") + parser.add_argument("--output", "-o", help="Output directory for optimized fonts", default="web_fonts") + parser.add_argument("--subset", "-s", action="store_true", help="Subset the fonts") + parser.add_argument("--chars", "-c", help="Characters to include in subset (e.g., 'U+0000-00FF')") + parser.add_argument("--css", help="Generate CSS file", default="web_fonts/fonts.css") + + args = parser.parse_args() + + ensure_tools_installed() + + output_dir = pathlib.Path(args.output) + output_dir.mkdir(parents=True, exist_ok=True) + + converted_files = process_font_directory( + args.input, output_dir, args.subset, args.chars + ) + + if converted_files and args.css: + generate_css(converted_files, args.css) + + print(f"Font optimization complete. Optimized {len(converted_files)} fonts.") + print(f"Original font directory: {args.input}") + print(f"Optimized font directory: {args.output}") + if args.css: + print(f"CSS file: {args.css}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/rendercv_fonts_web/EB Garamond/EBGaramond-Bold.woff2 b/rendercv_fonts_web/EB Garamond/EBGaramond-Bold.woff2 new file mode 100644 index 0000000..457c7a8 Binary files /dev/null and b/rendercv_fonts_web/EB Garamond/EBGaramond-Bold.woff2 differ diff --git a/rendercv_fonts_web/EB Garamond/EBGaramond-BoldItalic.woff2 b/rendercv_fonts_web/EB Garamond/EBGaramond-BoldItalic.woff2 new file mode 100644 index 0000000..77e87dc Binary files /dev/null and b/rendercv_fonts_web/EB Garamond/EBGaramond-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/EB Garamond/EBGaramond-Italic.woff2 b/rendercv_fonts_web/EB Garamond/EBGaramond-Italic.woff2 new file mode 100644 index 0000000..22a9af6 Binary files /dev/null and b/rendercv_fonts_web/EB Garamond/EBGaramond-Italic.woff2 differ diff --git a/rendercv_fonts_web/EB Garamond/EBGaramond-Regular.woff2 b/rendercv_fonts_web/EB Garamond/EBGaramond-Regular.woff2 new file mode 100644 index 0000000..594c6e0 Binary files /dev/null and b/rendercv_fonts_web/EB Garamond/EBGaramond-Regular.woff2 differ diff --git a/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Regular-400.woff2 b/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Regular-400.woff2 new file mode 100644 index 0000000..f8526c0 Binary files /dev/null and b/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Regular-400.woff2 differ diff --git a/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Solid-900.woff2 b/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Solid-900.woff2 new file mode 100644 index 0000000..4faa535 Binary files /dev/null and b/rendercv_fonts_web/Font Awesome 6/FontAwesome6-Solid-900.woff2 differ diff --git a/rendercv_fonts_web/Fontin/Fontin-Bold.woff2 b/rendercv_fonts_web/Fontin/Fontin-Bold.woff2 new file mode 100644 index 0000000..38003f7 Binary files /dev/null and b/rendercv_fonts_web/Fontin/Fontin-Bold.woff2 differ diff --git a/rendercv_fonts_web/Fontin/Fontin-Italic.woff2 b/rendercv_fonts_web/Fontin/Fontin-Italic.woff2 new file mode 100644 index 0000000..e4581b1 Binary files /dev/null and b/rendercv_fonts_web/Fontin/Fontin-Italic.woff2 differ diff --git a/rendercv_fonts_web/Fontin/Fontin-Regular.woff2 b/rendercv_fonts_web/Fontin/Fontin-Regular.woff2 new file mode 100644 index 0000000..097824d Binary files /dev/null and b/rendercv_fonts_web/Fontin/Fontin-Regular.woff2 differ diff --git a/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Bold.woff2 b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Bold.woff2 new file mode 100644 index 0000000..a919534 Binary files /dev/null and b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Bold.woff2 differ diff --git a/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-BoldItalic.woff2 b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-BoldItalic.woff2 new file mode 100644 index 0000000..6538234 Binary files /dev/null and b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Italic.woff2 b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Italic.woff2 new file mode 100644 index 0000000..5926c35 Binary files /dev/null and b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Italic.woff2 differ diff --git a/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Regular.woff2 b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Regular.woff2 new file mode 100644 index 0000000..34019c2 Binary files /dev/null and b/rendercv_fonts_web/Gentium Book Plus/GentiumBookPlus-Regular.woff2 differ diff --git a/rendercv_fonts_web/Lato/Lato-Bold.woff2 b/rendercv_fonts_web/Lato/Lato-Bold.woff2 new file mode 100644 index 0000000..343d4fb Binary files /dev/null and b/rendercv_fonts_web/Lato/Lato-Bold.woff2 differ diff --git a/rendercv_fonts_web/Lato/Lato-BoldItalic.woff2 b/rendercv_fonts_web/Lato/Lato-BoldItalic.woff2 new file mode 100644 index 0000000..56aa2ec Binary files /dev/null and b/rendercv_fonts_web/Lato/Lato-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Lato/Lato-Italic.woff2 b/rendercv_fonts_web/Lato/Lato-Italic.woff2 new file mode 100644 index 0000000..ed3302e Binary files /dev/null and b/rendercv_fonts_web/Lato/Lato-Italic.woff2 differ diff --git a/rendercv_fonts_web/Lato/Lato-Regular.woff2 b/rendercv_fonts_web/Lato/Lato-Regular.woff2 new file mode 100644 index 0000000..fc15998 Binary files /dev/null and b/rendercv_fonts_web/Lato/Lato-Regular.woff2 differ diff --git a/rendercv_fonts_web/Mukta/Mukta-Bold.woff2 b/rendercv_fonts_web/Mukta/Mukta-Bold.woff2 new file mode 100644 index 0000000..2e85d56 Binary files /dev/null and b/rendercv_fonts_web/Mukta/Mukta-Bold.woff2 differ diff --git a/rendercv_fonts_web/Mukta/Mukta-Regular.woff2 b/rendercv_fonts_web/Mukta/Mukta-Regular.woff2 new file mode 100644 index 0000000..0bf55a8 Binary files /dev/null and b/rendercv_fonts_web/Mukta/Mukta-Regular.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSans-Bold.woff2 b/rendercv_fonts_web/Noto Sans/NotoSans-Bold.woff2 new file mode 100644 index 0000000..d3e1c30 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSans-Bold.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSans-BoldItalic.woff2 b/rendercv_fonts_web/Noto Sans/NotoSans-BoldItalic.woff2 new file mode 100644 index 0000000..bccbca5 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSans-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSans-Italic.woff2 b/rendercv_fonts_web/Noto Sans/NotoSans-Italic.woff2 new file mode 100644 index 0000000..120578b Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSans-Italic.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSans-Regular.woff2 b/rendercv_fonts_web/Noto Sans/NotoSans-Regular.woff2 new file mode 100644 index 0000000..9972a51 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSans-Regular.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSansJP-Bold.woff2 b/rendercv_fonts_web/Noto Sans/NotoSansJP-Bold.woff2 new file mode 100644 index 0000000..a63acf3 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSansJP-Bold.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSansJP-Regular.woff2 b/rendercv_fonts_web/Noto Sans/NotoSansJP-Regular.woff2 new file mode 100644 index 0000000..f9d67b7 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSansJP-Regular.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSansKR-Bold.woff2 b/rendercv_fonts_web/Noto Sans/NotoSansKR-Bold.woff2 new file mode 100644 index 0000000..c47eb35 Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSansKR-Bold.woff2 differ diff --git a/rendercv_fonts_web/Noto Sans/NotoSansKR-Regular.woff2 b/rendercv_fonts_web/Noto Sans/NotoSansKR-Regular.woff2 new file mode 100644 index 0000000..598806d Binary files /dev/null and b/rendercv_fonts_web/Noto Sans/NotoSansKR-Regular.woff2 differ diff --git a/rendercv_fonts_web/Open Sans/OpenSans-Bold.woff2 b/rendercv_fonts_web/Open Sans/OpenSans-Bold.woff2 new file mode 100644 index 0000000..1fc4dea Binary files /dev/null and b/rendercv_fonts_web/Open Sans/OpenSans-Bold.woff2 differ diff --git a/rendercv_fonts_web/Open Sans/OpenSans-BoldItalic.woff2 b/rendercv_fonts_web/Open Sans/OpenSans-BoldItalic.woff2 new file mode 100644 index 0000000..5d91443 Binary files /dev/null and b/rendercv_fonts_web/Open Sans/OpenSans-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Open Sans/OpenSans-Italic.woff2 b/rendercv_fonts_web/Open Sans/OpenSans-Italic.woff2 new file mode 100644 index 0000000..dc35a71 Binary files /dev/null and b/rendercv_fonts_web/Open Sans/OpenSans-Italic.woff2 differ diff --git a/rendercv_fonts_web/Open Sans/OpenSans-Regular.woff2 b/rendercv_fonts_web/Open Sans/OpenSans-Regular.woff2 new file mode 100644 index 0000000..245918c Binary files /dev/null and b/rendercv_fonts_web/Open Sans/OpenSans-Regular.woff2 differ diff --git a/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Bold.woff2 b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Bold.woff2 new file mode 100644 index 0000000..7e51054 Binary files /dev/null and b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Bold.woff2 differ diff --git a/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-BoldItalic.woff2 b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-BoldItalic.woff2 new file mode 100644 index 0000000..05d84bf Binary files /dev/null and b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Italic.woff2 b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Italic.woff2 new file mode 100644 index 0000000..0ff9f07 Binary files /dev/null and b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Italic.woff2 differ diff --git a/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Regular.woff2 b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Regular.woff2 new file mode 100644 index 0000000..6a9e9de Binary files /dev/null and b/rendercv_fonts_web/Open Sauce Sans/OpenSauceSans-Regular.woff2 differ diff --git a/rendercv_fonts_web/Poppins/Poppins-Bold.woff2 b/rendercv_fonts_web/Poppins/Poppins-Bold.woff2 new file mode 100644 index 0000000..8a2eb83 Binary files /dev/null and b/rendercv_fonts_web/Poppins/Poppins-Bold.woff2 differ diff --git a/rendercv_fonts_web/Poppins/Poppins-BoldItalic.woff2 b/rendercv_fonts_web/Poppins/Poppins-BoldItalic.woff2 new file mode 100644 index 0000000..968d41c Binary files /dev/null and b/rendercv_fonts_web/Poppins/Poppins-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Poppins/Poppins-Italic.woff2 b/rendercv_fonts_web/Poppins/Poppins-Italic.woff2 new file mode 100644 index 0000000..248df97 Binary files /dev/null and b/rendercv_fonts_web/Poppins/Poppins-Italic.woff2 differ diff --git a/rendercv_fonts_web/Poppins/Poppins-Regular.woff2 b/rendercv_fonts_web/Poppins/Poppins-Regular.woff2 new file mode 100644 index 0000000..c2975a8 Binary files /dev/null and b/rendercv_fonts_web/Poppins/Poppins-Regular.woff2 differ diff --git a/rendercv_fonts_web/Raleway/Raleway-Bold.woff2 b/rendercv_fonts_web/Raleway/Raleway-Bold.woff2 new file mode 100644 index 0000000..90676f3 Binary files /dev/null and b/rendercv_fonts_web/Raleway/Raleway-Bold.woff2 differ diff --git a/rendercv_fonts_web/Raleway/Raleway-BoldItalic.woff2 b/rendercv_fonts_web/Raleway/Raleway-BoldItalic.woff2 new file mode 100644 index 0000000..6753c4b Binary files /dev/null and b/rendercv_fonts_web/Raleway/Raleway-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Raleway/Raleway-Italic.woff2 b/rendercv_fonts_web/Raleway/Raleway-Italic.woff2 new file mode 100644 index 0000000..54fa1e9 Binary files /dev/null and b/rendercv_fonts_web/Raleway/Raleway-Italic.woff2 differ diff --git a/rendercv_fonts_web/Raleway/Raleway-Regular.woff2 b/rendercv_fonts_web/Raleway/Raleway-Regular.woff2 new file mode 100644 index 0000000..b9214ec Binary files /dev/null and b/rendercv_fonts_web/Raleway/Raleway-Regular.woff2 differ diff --git a/rendercv_fonts_web/Roboto/Roboto-Bold.woff2 b/rendercv_fonts_web/Roboto/Roboto-Bold.woff2 new file mode 100644 index 0000000..74a4606 Binary files /dev/null and b/rendercv_fonts_web/Roboto/Roboto-Bold.woff2 differ diff --git a/rendercv_fonts_web/Roboto/Roboto-BoldItalic.woff2 b/rendercv_fonts_web/Roboto/Roboto-BoldItalic.woff2 new file mode 100644 index 0000000..6edc62c Binary files /dev/null and b/rendercv_fonts_web/Roboto/Roboto-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Roboto/Roboto-Italic.woff2 b/rendercv_fonts_web/Roboto/Roboto-Italic.woff2 new file mode 100644 index 0000000..3e69847 Binary files /dev/null and b/rendercv_fonts_web/Roboto/Roboto-Italic.woff2 differ diff --git a/rendercv_fonts_web/Roboto/Roboto-Regular.woff2 b/rendercv_fonts_web/Roboto/Roboto-Regular.woff2 new file mode 100644 index 0000000..d434e3b Binary files /dev/null and b/rendercv_fonts_web/Roboto/Roboto-Regular.woff2 differ diff --git a/rendercv_fonts_web/Source Sans 3/SourceSans3-Bold.woff2 b/rendercv_fonts_web/Source Sans 3/SourceSans3-Bold.woff2 new file mode 100644 index 0000000..ef1edcc Binary files /dev/null and b/rendercv_fonts_web/Source Sans 3/SourceSans3-Bold.woff2 differ diff --git a/rendercv_fonts_web/Source Sans 3/SourceSans3-BoldItalic.woff2 b/rendercv_fonts_web/Source Sans 3/SourceSans3-BoldItalic.woff2 new file mode 100644 index 0000000..c012eda Binary files /dev/null and b/rendercv_fonts_web/Source Sans 3/SourceSans3-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Source Sans 3/SourceSans3-Italic.woff2 b/rendercv_fonts_web/Source Sans 3/SourceSans3-Italic.woff2 new file mode 100644 index 0000000..9c44ea8 Binary files /dev/null and b/rendercv_fonts_web/Source Sans 3/SourceSans3-Italic.woff2 differ diff --git a/rendercv_fonts_web/Source Sans 3/SourceSans3-Regular.woff2 b/rendercv_fonts_web/Source Sans 3/SourceSans3-Regular.woff2 new file mode 100644 index 0000000..1b90109 Binary files /dev/null and b/rendercv_fonts_web/Source Sans 3/SourceSans3-Regular.woff2 differ diff --git a/rendercv_fonts_web/Ubuntu/Ubuntu-Bold.woff2 b/rendercv_fonts_web/Ubuntu/Ubuntu-Bold.woff2 new file mode 100644 index 0000000..95e5d6d Binary files /dev/null and b/rendercv_fonts_web/Ubuntu/Ubuntu-Bold.woff2 differ diff --git a/rendercv_fonts_web/Ubuntu/Ubuntu-BoldItalic.woff2 b/rendercv_fonts_web/Ubuntu/Ubuntu-BoldItalic.woff2 new file mode 100644 index 0000000..197e769 Binary files /dev/null and b/rendercv_fonts_web/Ubuntu/Ubuntu-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/Ubuntu/Ubuntu-Italic.woff2 b/rendercv_fonts_web/Ubuntu/Ubuntu-Italic.woff2 new file mode 100644 index 0000000..1d80813 Binary files /dev/null and b/rendercv_fonts_web/Ubuntu/Ubuntu-Italic.woff2 differ diff --git a/rendercv_fonts_web/Ubuntu/Ubuntu-Regular.woff2 b/rendercv_fonts_web/Ubuntu/Ubuntu-Regular.woff2 new file mode 100644 index 0000000..49b1b06 Binary files /dev/null and b/rendercv_fonts_web/Ubuntu/Ubuntu-Regular.woff2 differ diff --git a/rendercv_fonts_web/XCharter/XCharter-Bold.woff2 b/rendercv_fonts_web/XCharter/XCharter-Bold.woff2 new file mode 100644 index 0000000..54ccbc7 Binary files /dev/null and b/rendercv_fonts_web/XCharter/XCharter-Bold.woff2 differ diff --git a/rendercv_fonts_web/XCharter/XCharter-BoldItalic.woff2 b/rendercv_fonts_web/XCharter/XCharter-BoldItalic.woff2 new file mode 100644 index 0000000..06d0a8d Binary files /dev/null and b/rendercv_fonts_web/XCharter/XCharter-BoldItalic.woff2 differ diff --git a/rendercv_fonts_web/XCharter/XCharter-Italic.woff2 b/rendercv_fonts_web/XCharter/XCharter-Italic.woff2 new file mode 100644 index 0000000..b93a361 Binary files /dev/null and b/rendercv_fonts_web/XCharter/XCharter-Italic.woff2 differ diff --git a/rendercv_fonts_web/XCharter/XCharter-Regular.woff2 b/rendercv_fonts_web/XCharter/XCharter-Regular.woff2 new file mode 100644 index 0000000..fec05fb Binary files /dev/null and b/rendercv_fonts_web/XCharter/XCharter-Regular.woff2 differ diff --git a/rendercv_fonts_web/fonts.css b/rendercv_fonts_web/fonts.css new file mode 100644 index 0000000..363e20f --- /dev/null +++ b/rendercv_fonts_web/fonts.css @@ -0,0 +1,444 @@ +/* Optimized web fonts */ + +/* Mukta */ +@font-face { + font-family: 'Mukta'; + src: url('Mukta/Mukta-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Mukta'; + src: url('Mukta/Mukta-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +/* Open Sans */ +@font-face { + font-family: 'Open Sans'; + src: url('Open Sans/OpenSans-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Open Sans'; + src: url('Open Sans/OpenSans-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Open Sans'; + src: url('Open Sans/OpenSans-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Open Sans'; + src: url('Open Sans/OpenSans-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* Gentium Book Plus */ +@font-face { + font-family: 'Gentium Book Plus'; + src: url('Gentium Book Plus/GentiumBookPlus-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Gentium Book Plus'; + src: url('Gentium Book Plus/GentiumBookPlus-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Gentium Book Plus'; + src: url('Gentium Book Plus/GentiumBookPlus-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Gentium Book Plus'; + src: url('Gentium Book Plus/GentiumBookPlus-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +/* Noto Sans */ +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSans-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSansJP-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSans-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSansJP-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSansKR-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSans-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSansKR-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Noto Sans'; + src: url('Noto Sans/NotoSans-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Lato */ +@font-face { + font-family: 'Lato'; + src: url('Lato/Lato-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Lato'; + src: url('Lato/Lato-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Lato'; + src: url('Lato/Lato-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Lato'; + src: url('Lato/Lato-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* Source Sans 3 */ +@font-face { + font-family: 'Source Sans 3'; + src: url('Source Sans 3/SourceSans3-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Source Sans 3'; + src: url('Source Sans 3/SourceSans3-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Source Sans 3'; + src: url('Source Sans 3/SourceSans3-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Source Sans 3'; + src: url('Source Sans 3/SourceSans3-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* EB Garamond */ +@font-face { + font-family: 'EB Garamond'; + src: url('EB Garamond/EBGaramond-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'EB Garamond'; + src: url('EB Garamond/EBGaramond-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'EB Garamond'; + src: url('EB Garamond/EBGaramond-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'EB Garamond'; + src: url('EB Garamond/EBGaramond-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} + +/* Open Sauce Sans */ +@font-face { + font-family: 'Open Sauce Sans'; + src: url('Open Sauce Sans/OpenSauceSans-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Open Sauce Sans'; + src: url('Open Sauce Sans/OpenSauceSans-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Open Sauce Sans'; + src: url('Open Sauce Sans/OpenSauceSans-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Open Sauce Sans'; + src: url('Open Sauce Sans/OpenSauceSans-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Font Awesome 6 */ +@font-face { + font-family: 'Font Awesome 6'; + src: url('Font Awesome 6/FontAwesome6-Solid-900.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Font Awesome 6'; + src: url('Font Awesome 6/FontAwesome6-Regular-400.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} + +/* Fontin */ +@font-face { + font-family: 'Fontin'; + src: url('Fontin/Fontin-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Fontin'; + src: url('Fontin/Fontin-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Fontin'; + src: url('Fontin/Fontin-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Roboto */ +@font-face { + font-family: 'Roboto'; + src: url('Roboto/Roboto-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url('Roboto/Roboto-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url('Roboto/Roboto-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Roboto'; + src: url('Roboto/Roboto-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +/* Ubuntu */ +@font-face { + font-family: 'Ubuntu'; + src: url('Ubuntu/Ubuntu-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Ubuntu'; + src: url('Ubuntu/Ubuntu-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Ubuntu'; + src: url('Ubuntu/Ubuntu-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Ubuntu'; + src: url('Ubuntu/Ubuntu-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Poppins */ +@font-face { + font-family: 'Poppins'; + src: url('Poppins/Poppins-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Poppins'; + src: url('Poppins/Poppins-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Poppins'; + src: url('Poppins/Poppins-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Poppins'; + src: url('Poppins/Poppins-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} + +/* Raleway */ +@font-face { + font-family: 'Raleway'; + src: url('Raleway/Raleway-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Raleway'; + src: url('Raleway/Raleway-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'Raleway'; + src: url('Raleway/Raleway-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'Raleway'; + src: url('Raleway/Raleway-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +} + +/* XCharter */ +@font-face { + font-family: 'XCharter'; + src: url('XCharter/XCharter-Regular.woff2') format('woff2'); + font-weight: 400; + font-style: normal; + font-display: swap; +} +@font-face { + font-family: 'XCharter'; + src: url('XCharter/XCharter-Italic.woff2') format('woff2'); + font-weight: 400; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'XCharter'; + src: url('XCharter/XCharter-BoldItalic.woff2') format('woff2'); + font-weight: 700; + font-style: italic; + font-display: swap; +} +@font-face { + font-family: 'XCharter'; + src: url('XCharter/XCharter-Bold.woff2') format('woff2'); + font-weight: 700; + font-style: normal; + font-display: swap; +}