2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
62 |
63 | ## Italics
64 |
65 | Lilex comes with a full set of italics: all weights, ligatures, PowerLine. Lilex Italic can do everything that Lilex does.
66 |
67 |
68 |
69 | ## Character Set
70 |
71 | The font has support for Latin, Cyrillic and Greek. It also includes ligatures and powerline symbols.
72 |
73 |
74 |
75 | A full glyph table can be found on the [preview page](https://mishamyrt.github.io/Lilex/).
76 |
77 | ## Features
78 |
79 | The font has additional styles for some characters, so it can be configured to better fit your needs. Instructions on how to activate OpenType features in your IDE can be found on the internet, or [build your own variation](#forced-feature-activation) of the font with forced features
80 |
81 |
82 |
83 | Some ligatures also have additional options. For example, certain arrows are initially switched off to avoid conflicts with logical operations.
84 |
85 |
86 |
87 | ### Arrows
88 |
89 | Lilex uses generated ligatures for arrows, so they can be infinite. Combine that to assemble your unique arrows.
90 |
91 | There is also a full set of single-character arrows (`↑`, `↓`, etc.) in the font.
92 |
93 |
94 |
95 | ## Development
96 |
97 | If you want to make improvements to the project, see [CONTRIBUTING.md](CONTRIBUTING.md).
98 |
99 | ## License
100 |
101 | Lilex typeface is available under the [OFL-1.1 License](https://github.com/mishamyrt/Lilex/blob/master/OFL.txt) and can be used free of charge, for both commercial and non-commercial purposes.
102 |
103 | The source code is available under [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
104 |
105 | ## Credits
106 |
107 | - Author: Mikhael Khrustik
108 | - Based on: [IBM Plex Mono](https://github.com/IBM/plex)
109 | - Inspired by: [Fira Code](https://github.com/tonsky/FiraCode)
110 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # Project directories
2 | BUILD_DIR := build
3 | RELEASE_DIR := fonts
4 | REPORTS_DIR := reports
5 | SCRIPTS_DIR := scripts
6 | SOURCE_DIR := sources
7 | WEBSITE_DIR := website
8 |
9 | # Internal build variables
10 | PYTHON_VERSION := 3.13
11 | OS := $(shell uname)
12 | VENV_DIR = ./.venv
13 | VENV = . $(VENV_DIR)/bin/activate;
14 |
15 | # Font build
16 |
17 | .PHONY: configure
18 | configure: ## setup font build environment
19 | @rm -rf "$(VENV_DIR)"
20 | @uv venv --python $(PYTHON_VERSION)
21 | @uv sync
22 | @uv run youseedee A > /dev/null
23 | uv tool run lefthook install
24 |
25 | .PHONY: generate
26 | generate: ## regenerate the font sources
27 | @$(VENV) python $(SCRIPTS_DIR)/generate.py \
28 | --config "$(SOURCE_DIR)/lilexgen_config.yaml" \
29 | generate
30 |
31 | .PHONY: build
32 | build: ## build the font
33 | @make build-mono
34 | @make build-duo
35 |
36 | .PHONY: build-mono
37 | build-mono: ## build Lilex monospaced font
38 | @$(call build-font,Lilex)
39 |
40 | .PHONY: build-duo
41 | build-duo: ## build Lilex Duo font
42 | @$(call build-font,LilexDuo)
43 |
44 | .PHONY: release
45 | release: build ## release the font
46 | @rm -rf $(RELEASE_DIR)
47 | @cp -r $(BUILD_DIR) $(RELEASE_DIR)
48 |
49 | define build-font
50 | @rm -rf $(BUILD_DIR)/$(1)
51 | @$(VENV) cd $(SOURCE_DIR)/$(1); gftools builder config.yaml
52 | endef
53 |
54 | # Font quality check
55 |
56 | .PHONY: check
57 | check: ## check Lilex font quality
58 | @make check-mono
59 | @make check-duo
60 |
61 | .PHONY: check-mono
62 | check-mono: ## check Lilex font quality
63 | $(call fontbakery-check,parallel,Lilex)
64 |
65 | .PHONY: check-duo
66 | check-duo: ## check Lilex Duo font quality
67 | $(call fontbakery-check,parallel,LilexDuo)
68 |
69 | .PHONY: check-sequential
70 | check-sequential: ## check Lilex font quality sequentially (for CI)
71 | $(call fontbakery-check,sequential,Lilex)
72 | $(call fontbakery-check,sequential,LilexDuo)
73 |
74 | define fontbakery-check
75 | $(call fontbakery-check-format,$(1),$(2),variable)
76 | $(call fontbakery-check-format,$(1),$(2),ttf)
77 | endef
78 |
79 | # usage: $(call fontbakery-check,[parallel|sequential],font_name,font_format)
80 | define fontbakery-check-format
81 | @mkdir -p "$(REPORTS_DIR)"
82 | @$(VENV) fontbakery check-googlefonts \
83 | $(if $(filter-out parallel,$(1)),,--auto-jobs) \
84 | $(if $(filter-out variable,$(3)),-x opentype/STAT/ital_axis) \
85 | -x fontdata_namecheck \
86 | --html "$(REPORTS_DIR)/$(2)_$(3).html" \
87 | "$(BUILD_DIR)/$(2)/$(3)/"*
88 | endef
89 |
90 | # Scripts and scripts management
91 |
92 | .PHONY: scripts-print-updates
93 | scripts-print-updates: ## print list of outdated packages
94 | @uv tree --depth 1 --outdated
95 |
96 | .PHONY: scripts-lint
97 | scripts-lint: ## lint scripts
98 | @uv tool run ruff check $(SCRIPTS_DIR)/
99 |
100 | .PHONY: scripts-lint-fix
101 | scripts-lint-fix: ## lint scripts and autofix errors
102 | @uv tool run ruff check --fix $(SCRIPTS_DIR)/
103 |
104 | .PHONY: scripts-format
105 | scripts-format: ## format scripts
106 | @uv tool run ruff format $(SCRIPTS_DIR)/
107 |
108 | # Website
109 |
110 | .PHONY: website-configure
111 | website-configure: ## setup website environment
112 | @cd $(WEBSITE_DIR); pnpm install
113 |
114 | .PHONY: website-run
115 | website-serve: _website-env ## run the website
116 | @cd $(WEBSITE_DIR); pnpm run dev
117 |
118 | .PHONY: website-build
119 | website-build: _website-env ## build the website
120 | @cd $(WEBSITE_DIR); pnpm run build
121 |
122 | .PHONY: print-updates
123 | website-print-updates: ## print list of outdated packages
124 | @cd $(WEBSITE_DIR); pnpm outdated
125 |
126 | .PHONY: website-lint
127 | website-lint: ## check preview website code quality
128 | @cd $(WEBSITE_DIR); pnpm lint
129 |
130 | .PHONY: website-format
131 | website-format: ## format preview website code
132 | @cd $(WEBSITE_DIR); pnpm format
133 |
134 | .PHONY: _website-env
135 | _website-env:
136 | uv run $(SCRIPTS_DIR)/website_env.py \
137 | generate \
138 | $(BUILD_DIR)/Lilex/ttf/Lilex-Regular.ttf \
139 | $(WEBSITE_DIR)/.env
140 |
141 | # Install
142 |
143 | .PHONY: install
144 | install: ## install font to system (macOS and Linux only)
145 | @make install-$(OS)
146 |
147 | .PHONY: install-Darwin
148 | install-Darwin:
149 | @rm -rf ~/Library/Fonts/Lilex ~/Library/Fonts/LilexDuo
150 | @mkdir -p ~/Library/Fonts/Lilex ~/Library/Fonts/LilexDuo
151 | @cp -r $(BUILD_DIR)/Lilex/variable ~/Library/Fonts/Lilex
152 | @cp -r $(BUILD_DIR)/LilexDuo/variable ~/Library/Fonts/LilexDuo
153 |
154 |
155 | install-Linux:
156 | @rm -rf ~/.fonts/Lilex ~/.fonts/LilexDuo
157 | @mkdir -p ~/.fonts/Lilex ~/.fonts/LilexDuo
158 | @cp -r $(BUILD_DIR)/Lilex/ttf ~/.fonts/Lilex
159 | @cp -r $(BUILD_DIR)/LilexDuo/ttf ~/.fonts/LilexDuo
160 |
161 | # Utilities
162 |
163 | .PHONY: help
164 | help: ## print this message
165 | @awk \
166 | 'BEGIN {FS = ":.*?## "} \
167 | /^[a-zA-Z_-]+:.*?## / \
168 | {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}' \
169 | $(MAKEFILE_LIST)
170 |
171 | .PHONY: clean
172 | clean: ## clean up artifacts
173 | @rm -rf $(BUILD_DIR)
174 | @rm -rf $(REPORTS_DIR)
175 | @rm -rf $(VENV_DIR)
176 |
--------------------------------------------------------------------------------
/website/src/components/Powerline.astro:
--------------------------------------------------------------------------------
1 | ---
2 | const RIGHT_BLACK_ARROW_CHAR = "\uE0B0"
3 | const RIGHT_ARROW_CHAR = "\uE0B1"
4 | const LEFT_BLACK_ARROW_CHAR = "\uE0B2"
5 | const LEFT_ARROW_CHAR = "\uE0B3"
6 |
7 | export type Part = {
8 | text: string;
9 | color?: 'grey_10' | 'grey_30' | 'grey_60' | 'yellow_60' | 'green' | 'red';
10 | isPath?: boolean;
11 | icon?: string;
12 | }
13 |
14 | export type Props = {
15 | class?: string;
16 | parts: Part[];
17 | direction?: 'left' | 'right';
18 | }
19 |
20 | const { class: className, parts, direction = 'right', ...props } = Astro.props;
21 |
22 | const pathDelimiter = direction === 'right' ? RIGHT_ARROW_CHAR : LEFT_ARROW_CHAR
23 |
24 | const renderedParts = parts.map((part) => {
25 | const textSegments = part.isPath
26 | ? part.text.split('/').map(segment => segment.trim())
27 | : [part.text];
28 | return {
29 | textSegments,
30 | color: part.color,
31 | isPath: part.isPath,
32 | icon: part.icon
33 | }
34 | })
35 | ---
36 |
37 |