Skip to content

Commit bba3ada

Browse files
Merge branch 'codewithnick:main' into main
2 parents 9d605e1 + daf0676 commit bba3ada

File tree

9 files changed

+1219
-1256
lines changed

9 files changed

+1219
-1256
lines changed

Fonts/Boomer/boomer.h

Lines changed: 287 additions & 290 deletions
Large diffs are not rendered by default.

Fonts/Straight/straight.h

Lines changed: 234 additions & 266 deletions
Large diffs are not rendered by default.

Fonts/banner/banner.h

Lines changed: 199 additions & 236 deletions
Large diffs are not rendered by default.

Fonts/carlos/carlos.h

Lines changed: 135 additions & 119 deletions
Large diffs are not rendered by default.

Fonts/fonts.h

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,19 @@
99

1010
class Fonts
1111
{
12+
int def_rows;
13+
int def_cols;
1214
int char_rows;
1315
int char_cols;
1416
int curr_col;
15-
std::vector<std::vector<char> > letters;
17+
std::vector<std::vector<char>> letters;
1618

1719
protected:
18-
char **getCharGrid()
20+
char **getCharGrid(int rows = 0, int cols = 0)
1921
{
22+
this->char_rows = rows ? rows : def_rows;
23+
this->char_cols = cols ? cols : def_cols;
24+
2025
char **char_grid = new char *[char_rows];
2126
for (int i = 0; i < char_rows; i++)
2227
{
@@ -28,13 +33,13 @@ class Fonts
2833
}
2934

3035
public:
31-
Fonts(int char_rows, int char_cols)
36+
Fonts(int def_rows, int def_cols)
3237
{
33-
this->char_rows = char_rows;
34-
this->char_cols = char_cols;
38+
this->def_rows = def_rows;
39+
this->def_cols = def_cols;
3540

36-
letters.reserve(char_rows);
37-
for (int i = 0; i < char_rows; i++)
41+
letters.reserve(def_rows);
42+
for (int i = 0; i < def_rows; i++)
3843
{
3944
letters.emplace_back(100, ' '); // Create rows with 100 spaces each
4045
}
@@ -45,6 +50,12 @@ class Fonts
4550
{
4651
if (!character)
4752
return;
53+
54+
while (letters.size() < char_rows)
55+
{
56+
letters.emplace_back(100, ' ');
57+
}
58+
4859
for (int i = 0; i < char_rows; i++)
4960
{
5061
for (int j = 0; j < char_cols; j++)
@@ -55,7 +66,7 @@ class Fonts
5566
curr_col += (char_cols + 2);
5667
}
5768

58-
std::vector<std::vector<char> > getletters()
69+
std::vector<std::vector<char>> getletters()
5970
{
6071
return letters;
6172
}

Fonts/starwar/starwar.h

Lines changed: 290 additions & 303 deletions
Large diffs are not rendered by default.

Fonts/starwar/starwar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ ____ ____
243243
|____/
244244
```
245245
```
246-
_ _
246+
_ _
247247
| || |
248248
| || |_
249249
|__ _|

example.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#include "Ascii.h"
22
#include "string"
33

4-
using namespace ascii;
4+
using namespace ascii;
55

66
int main()
77
{
8-
Ascii a = Ascii(straight);
9-
a.print("p");
8+
Ascii a = Ascii(carlos);
9+
a.print("A0ZXSQ");
1010
return 0;
11-
}
11+
}

readme.md

Lines changed: 50 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
125125
</a>
126126
</td>
127127
<td align="center">
128-
<a href="https://github.com/Rishisihare90">
129-
<img src="https://avatars.githubusercontent.com/u/146431939?v=4" width="70;" alt="Rishisihare90"/>
128+
<a href="https://github.com/NeerajSh-16">
129+
<img src="https://avatars.githubusercontent.com/u/144585755?v=4" width="70;" alt="NeerajSh-16"/>
130130
<br />
131-
<sub><b>Rishisihare90</b></sub>
131+
<sub><b>NeerajSh-16</b></sub>
132132
</a>
133133
</td>
134134
<td align="center">
135-
<a href="https://github.com/NeerajSh-16">
136-
<img src="https://avatars.githubusercontent.com/u/144585755?v=4" width="70;" alt="NeerajSh-16"/>
135+
<a href="https://github.com/Rishisihare90">
136+
<img src="https://avatars.githubusercontent.com/u/146431939?v=4" width="70;" alt="Rishisihare90"/>
137137
<br />
138-
<sub><b>NeerajSh-16</b></sub>
138+
<sub><b>Rishisihare90</b></sub>
139139
</a>
140140
</td>
141141
<td align="center">
@@ -146,24 +146,24 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
146146
</a>
147147
</td>
148148
<td align="center">
149-
<a href="https://github.com/komal7141">
150-
<img src="https://avatars.githubusercontent.com/u/75818108?v=4" width="70;" alt="komal7141"/>
149+
<a href="https://github.com/XARTAN21">
150+
<img src="https://avatars.githubusercontent.com/u/124522194?v=4" width="70;" alt="XARTAN21"/>
151151
<br />
152-
<sub><b>komal7141</b></sub>
152+
<sub><b>XARTAN21</b></sub>
153153
</a>
154154
</td>
155155
<td align="center">
156-
<a href="https://github.com/XARTAN21">
157-
<img src="https://avatars.githubusercontent.com/u/124522194?v=4" width="70;" alt="XARTAN21"/>
156+
<a href="https://github.com/Harry121199">
157+
<img src="https://avatars.githubusercontent.com/u/117886160?v=4" width="70;" alt="Harry121199"/>
158158
<br />
159-
<sub><b>XARTAN21</b></sub>
159+
<sub><b>Harry121199</b></sub>
160160
</a>
161161
</td>
162162
<td align="center">
163-
<a href="https://github.com/AlexWeb07">
164-
<img src="https://avatars.githubusercontent.com/u/93365089?v=4" width="70;" alt="AlexWeb07"/>
163+
<a href="https://github.com/komal7141">
164+
<img src="https://avatars.githubusercontent.com/u/75818108?v=4" width="70;" alt="komal7141"/>
165165
<br />
166-
<sub><b>AlexWeb07</b></sub>
166+
<sub><b>komal7141</b></sub>
167167
</a>
168168
</td></tr>
169169
<tr>
@@ -174,6 +174,20 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
174174
<sub><b>gulshankapse</b></sub>
175175
</a>
176176
</td>
177+
<td align="center">
178+
<a href="https://github.com/AlexWeb07">
179+
<img src="https://avatars.githubusercontent.com/u/93365089?v=4" width="70;" alt="AlexWeb07"/>
180+
<br />
181+
<sub><b>AlexWeb07</b></sub>
182+
</a>
183+
</td>
184+
<td align="center">
185+
<a href="https://github.com/chengm405">
186+
<img src="https://avatars.githubusercontent.com/u/146371159?v=4" width="70;" alt="chengm405"/>
187+
<br />
188+
<sub><b>chengm405</b></sub>
189+
</a>
190+
</td>
177191
<td align="center">
178192
<a href="https://github.com/vishallmaurya">
179193
<img src="https://avatars.githubusercontent.com/u/115442999?v=4" width="70;" alt="vishallmaurya"/>
@@ -201,7 +215,8 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
201215
<br />
202216
<sub><b>Atul-Xalxo</b></sub>
203217
</a>
204-
</td>
218+
</td></tr>
219+
<tr>
205220
<td align="center">
206221
<a href="https://github.com/Priyanshu-kr-gupta">
207222
<img src="https://avatars.githubusercontent.com/u/114975117?v=4" width="70;" alt="Priyanshu-kr-gupta"/>
@@ -215,8 +230,7 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
215230
<br />
216231
<sub><b>PranjalKhatri</b></sub>
217232
</a>
218-
</td></tr>
219-
<tr>
233+
</td>
220234
<td align="center">
221235
<a href="https://github.com/Stunner33">
222236
<img src="https://avatars.githubusercontent.com/u/127297054?v=4" width="70;" alt="Stunner33"/>
@@ -251,7 +265,8 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
251265
<br />
252266
<sub><b>akashKumar06</b></sub>
253267
</a>
254-
</td>
268+
</td></tr>
269+
<tr>
255270
<td align="center">
256271
<a href="https://github.com/ankitkujur15">
257272
<img src="https://avatars.githubusercontent.com/u/144579619?v=4" width="70;" alt="ankitkujur15"/>
@@ -265,8 +280,7 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
265280
<br />
266281
<sub><b>gourshabrg</b></sub>
267282
</a>
268-
</td></tr>
269-
<tr>
283+
</td>
270284
<td align="center">
271285
<a href="https://github.com/ahmad-kaif">
272286
<img src="https://avatars.githubusercontent.com/u/113821761?v=4" width="70;" alt="ahmad-kaif"/>
@@ -301,7 +315,8 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
301315
<br />
302316
<sub><b>FreemRL</b></sub>
303317
</a>
304-
</td>
318+
</td></tr>
319+
<tr>
305320
<td align="center">
306321
<a href="https://github.com/Arif20484423">
307322
<img src="https://avatars.githubusercontent.com/u/76733190?v=4" width="70;" alt="Arif20484423"/>
@@ -315,13 +330,12 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
315330
<br />
316331
<sub><b>abhay5624</b></sub>
317332
</a>
318-
</td></tr>
319-
<tr>
333+
</td>
320334
<td align="center">
321-
<a href="https://github.com/chengm405">
322-
<img src="https://avatars.githubusercontent.com/u/146371159?v=4" width="70;" alt="chengm405"/>
335+
<a href="https://github.com/vishalmishraa">
336+
<img src="https://avatars.githubusercontent.com/u/64027486?v=4" width="70;" alt="vishalmishraa"/>
323337
<br />
324-
<sub><b>chengm405</b></sub>
338+
<sub><b>vishalmishraa</b></sub>
325339
</a>
326340
</td>
327341
<td align="center">
@@ -345,6 +359,14 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
345359
<sub><b>hellomohit722</b></sub>
346360
</a>
347361
</td>
362+
<td align="center">
363+
<a href="https://github.com/NANDANA-S-P">
364+
<img src="https://avatars.githubusercontent.com/u/79624565?v=4" width="70;" alt="NANDANA-S-P"/>
365+
<br />
366+
<sub><b>NANDANA-S-P</b></sub>
367+
</a>
368+
</td></tr>
369+
<tr>
348370
<td align="center">
349371
<a href="https://github.com/prajjawal007">
350372
<img src="https://avatars.githubusercontent.com/u/144593090?v=4" width="70;" alt="prajjawal007"/>
@@ -365,8 +387,7 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
365387
<br />
366388
<sub><b>VikashBurman</b></sub>
367389
</a>
368-
</td></tr>
369-
<tr>
390+
</td>
370391
<td align="center">
371392
<a href="https://github.com/abhishekyadav76">
372393
<img src="https://avatars.githubusercontent.com/u/132427787?v=4" width="70;" alt="abhishekyadav76"/>

0 commit comments

Comments
 (0)