MCPcopy Create free account

hub / github.com/SerCeMan/fontogen / functions

Functions71 in github.com/SerCeMan/fontogen

↓ 7 callersMethodload_font
(self, path: str, allow_missing: bool = False, coordinates: Optional[NormalizedCoords]=None)
fonts.py:58
↓ 6 callersMethoddecode_point
(self, token: int)
font_codec.py:91
↓ 6 callersMethodencode_point
(self, point: Tuple[int, int])
font_codec.py:33
↓ 6 callersMethodnormalize_font
(self, font: Font)
fonts.py:178
↓ 4 callersMethod__init__
(self, config: FontogenConfig, font_codec: FontCodec)
model/model.py:158
↓ 4 callersMethodencode_font
(self, font: Font, limit: int = -1, pad_glyphs: bool = False)
font_codec.py:39
↓ 4 callersFunctionfontogen_config
()
config.py:22
↓ 4 callersMethodplt_font
(self, font: Font)
fonts.py:255
↓ 3 callersMethoddecode_font
(self, tokens: torch.Tensor)
font_codec.py:98
↓ 3 callersMethodembed_tokens
(self, text_tokens: torch.Tensor)
model/text_embedding.py:28
↓ 3 callersFunctionfont_generator
(font_txt, temperature: int = None, glyphs: str = None, strategy: str = None, checkpoint_pa
server.py:63
↓ 3 callersMethodsample
(self, text: str, step: int = -1, temperature: int = None, strategy: str = None)
sampler.py:163
↓ 3 callersMethodtokenize_batch
(self, text_batch: List[str])
model/text_embedding.py:14
↓ 2 callersFunctioncreate_sampler
( out_folder: str, glyphs: str = None, checkpoint_path: str = 'models/fontogen_78958.c
sampler.py:190
↓ 2 callersMethodmake_a_step
(self, batch)
model/model.py:116
↓ 2 callersMethodplot_quadratic_bezier_curve
Plot a quadratic Bézier curve given its control points.
fonts.py:191
↓ 2 callersMethodsave_as_ttf
(self, path: str, font: Font)
fonts.py:102
↓ 1 callersMethod__init__
(self, glyps: str, glyph_res: int)
fonts.py:27
↓ 1 callersMethod__init__
(self, model: FontogenModule, config: FontogenConfig, out_folder: str, glyphs: str = None)
sampler.py:67
↓ 1 callersMethodextract_path_data_using_pen
Extract glyph path data using the pen API.
fonts.py:49
↓ 1 callersMethodfind_boundaries
(self, font)
fonts.py:141
↓ 1 callersMethodfont_embeddings
(self, font_tokens: torch.Tensor)
model/model.py:183
↓ 1 callersMethodfont_to_vec
(self, tokens: torch.Tensor)
model/model.py:38
↓ 1 callersMethodforward
(self, text_embeddings: torch.Tensor, font_tokens: torch.Tensor)
model/model.py:110
↓ 1 callersFunctiongenerate_font_paragraphs
(glyphs: str, fonts: List[str])
server.py:46
↓ 1 callersFunctiongenerate_font_styles
(fonts)
server.py:26
↓ 1 callersFunctionmain
()
train.py:14
↓ 1 callersFunctionmain
()
process_dataset.py:12
↓ 1 callersMethodplot_cubic_bezier_curve
Plot a cubic Bézier curve given its control points.
fonts.py:199
↓ 1 callersMethodplot_glyph_from_pen_data
Plot glyph from pen data.
fonts.py:212
↓ 1 callersMethodrecord_glyph_paths
(self, glyph_paths: Dict[str, GlyphPaths])
fonts.py:77
↓ 1 callersMethodsample_font
(self, text_embeddings: torch.Tensor, temperature: int = None, strategy: str = None)
sampler.py:105
↓ 1 callersMethodsample_next_token
(self, logit: torch.Tensor, strategy: str = 'greedy', temperature: float = 1.0)
sampler.py:83
↓ 1 callersMethodscale_and_translate_path_data
Scale the path data to fit within the target range, round to integers, and then translate it to make all coordinates non-negative.
fonts.py:158
↓ 1 callersFunctiontop_k_top_p_filtering
Filter a distribution of logits using top-k and/or nucleus (top-p) filtering Args: logits: logits distribution shape (vocabulary
sampler.py:36
↓ 1 callersMethodtry_save_font_tokens
(self, font_path: str, font: Font)
sampler.py:180
Method__getitem__
(self, idx)
dataset/loader.py:23
Method__init__
(self, glyps: str, glyph_res: int, max_font_tokens: int, max_glyph_tokens: int)
font_codec.py:9
Method__init__
(self, glyph_res: int)
fonts.py:138
Method__init__
(self)
fonts.py:187
Method__init__
(self, config: FontogenConfig, sample_every_epoch: int, out_folder: str)
sampler.py:16
Method__init__
(self, ds_file, device)
dataset/loader.py:16
Method__init__
(self, max_text_token_len: int, device: str)
model/text_embedding.py:8
Method__init__
(self, d_model: int, font_codec: FontCodec, glyph_res: int, max_seq_len: int, device: str)
model/model.py:23
Method__init__
(self, config: FontogenConfig, dataset_path: str, val_perc=0.04)
model/model.py:69
Method__init__
(self, config: FontogenConfig)
model/model.py:102
Method__init__
(self, d_model: int, nhead: int, num_layers: int, text_vocab_size: int, font_vocab_size: int,
model/model.py:192
Method__len__
(self)
dataset/loader.py:20
Methodclose_path
(c)
fonts.py:40
Methodconfigure_optimizers
(self)
model/model.py:142
Methodcubic_to
(c1x,c1y,c2x,c2y,x,y,c)
fonts.py:36
Methodembed_text
(self, text_batch: List[str])
model/text_embedding.py:37
Methodforward
(self, font_tokens: torch.Tensor)
model/model.py:49
Methodforward
(self, text_embeddings, font_tokens)
model/model.py:186
Methodforward
(self, text_embeddings, font_embeddings)
model/model.py:238
Functiongenerate
(font_text, selected_model)
server.py:115
Methodline_to
(x,y,c)
fonts.py:34
Methodmove_to
(x,y,c)
fonts.py:32
Methodnext_idx
()
font_codec.py:45
Methodon_train_epoch_start
(self, trainer: pl.Trainer, pl_module: pl.LightningModule)
sampler.py:23
Methodquadratic_to
(c1x,c1y,x,y,c)
fonts.py:38
Functionrefresh
()
server.py:127
Methodtest_font_coding_decoding_otf
(self)
tests/test_codec.py:24
Methodtest_font_coding_decoding_ttf
(self)
tests/test_codec.py:9
Methodtest_font_plotting_otf
(self)
tests/test_fonts.py:46
Methodtest_font_plotting_ttf
(self)
tests/test_fonts.py:34
Methodtest_font_saving_ttf
(self)
tests/test_fonts.py:8
Methodtrain_dataloader
(self)
model/model.py:82
Methodtraining_step
(self, batch: Dict[str, List[str]], batch_idx: int)
model/model.py:128
Methodval_dataloader
(self)
model/model.py:89
Methodvalidation_step
(self, batch: Dict[str, List[str]], batch_idx: int)
model/model.py:135