Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
AnshumanMahato authored Oct 19, 2023
2 parents 3d62b36 + f97863e commit 5d059b7
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 49 deletions.
4 changes: 4 additions & 0 deletions Ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ namespace ascii
else if (c == '9')
character = font->nine();

//for space
else if (c == ' ')
character = font->space();

font->pushChar(character);
}
font->printvector();
Expand Down
10 changes: 10 additions & 0 deletions Fonts/Boomer/boomer.h
Original file line number Diff line number Diff line change
Expand Up @@ -793,5 +793,15 @@ class Boomer : public Fonts
character[3][0] = character[5][0] = '\\';
return character;
}

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}
};
#endif
10 changes: 10 additions & 0 deletions Fonts/SevenStar/sevenstar.h
Original file line number Diff line number Diff line change
Expand Up @@ -2461,5 +2461,15 @@ class SevenStar : public Fonts
}
return character;
}

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}
};
#endif
54 changes: 38 additions & 16 deletions Fonts/Straight/straight.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,27 +114,40 @@ class Straight : public Fonts
return character;
}

/*

char **J()
{
char **character = getCharGrid(ROWS,COLS);

char **character = getCharGrid(3,3);

//Enter the character grid in ROWS X COLS
character[1][0] = character[1][1] = ' ';
character[2][0] = character[2][1] = '_';
character[2][2] = ')';
character[1][2] ='|';

return character;
}
*/


/*
char **K()
{
char **character = getCharGrid(ROWS,COLS);
char **character = getCharGrid(3,3);

//Enter the character grid in ROWS X COLS

character[1][0] = character[2][0] = '|';
character[1][1] = '_';
character[1][2] = '/';
character[2][2] ='\\';
character[2][1] = ' ';

return character;
}
*/




char **L()
{
Expand Down Expand Up @@ -412,17 +425,16 @@ class Straight : public Fonts
return character;
}

/*
char **j()
{
char **character = getCharGrid(ROWS,COLS);
//Enter the character grid in ROWS X COLS
char **j()
{
char **character = getCharGrid(4, 3);

return character;
}
character[1][1] = '.';
character[2][1] = '|';
character[3][1] = '/';

*/
return character;
}

char **k()
{
Expand Down Expand Up @@ -721,6 +733,16 @@ class Straight : public Fonts
character[2][3] = '/';
character[1][3] = '\\';

return character;
}

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}
};
Expand Down
12 changes: 11 additions & 1 deletion Fonts/banner/banner.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Banner : public Fonts
return character;
}

/*
/*
char **K()
{
char **character = getCharGrid(ROWS,COLS);
Expand All @@ -126,6 +126,7 @@ class Banner : public Fonts
return character;
}
*/


char **L()
{
Expand Down Expand Up @@ -696,6 +697,15 @@ class Banner : public Fonts
return character;
}

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}

};
#endif
21 changes: 18 additions & 3 deletions Fonts/carlos/carlos.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,21 @@ class Carlos : public Fonts
return character;
}

/*

char **I()
{
char **character = getCharGrid(ROWS,COLS);
char **character = getCharGrid(7,8);

//Enter the character grid in ROWS X COL
character[0][2] = character[0][3] = character[0][4] = character[0][5] = character[0][6] = character[1][2] = character[1][6] = character[5][2] = character[5][6] = character[5][7] = character[6][2] = character[6][3] = character[6][4] = character[6][5] = character[6][6] = '_';
character[2][3] = character[2][5] = character[3][3] = character[3][5] = character[4][3] = character[4][5] = character[5][3] = character[5][5] = '|';
character[1][1] = character[6][7] = '(';
character[1][7] = ')';
character[6][1] = '/';

return character;
}
*/


char **J()
{
Expand Down Expand Up @@ -1012,5 +1017,15 @@ class Carlos : public Fonts
}
*/

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}
};
#endif
7 changes: 7 additions & 0 deletions Fonts/fonts.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ class Fonts
}

/********************************adding virtual functions********************************/
// Virtual functions for space
virtual char **space()
{
std::cout << "space not overridden?" << std::endl;
return nullptr;
}

// Virtual functions for lowercase letters
virtual char **a()
{
Expand Down
10 changes: 10 additions & 0 deletions Fonts/starwar/starwar.h
Original file line number Diff line number Diff line change
Expand Up @@ -805,5 +805,15 @@ class Starwar : public Fonts
character[2][0] = character[2][6] = character[3][6] = '|';
return character;
}

// for space
char **space()
{
char **character = getCharGrid(1,1);

character[0][0] = ' ';

return character;
}
};
#endif
4 changes: 2 additions & 2 deletions example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ using namespace ascii;

int main()
{
Ascii a = Ascii(starwar);
a.print("K");
Ascii a = Ascii(carlos);
a.print("I");
return 0;
}
61 changes: 34 additions & 27 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<sub><b>Harry121199</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/komal7141">
<img src="https://avatars.githubusercontent.com/u/75818108?v=4" width="70;" alt="komal7141"/>
<br />
<sub><b>komal7141</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Rishisihare90">
<img src="https://avatars.githubusercontent.com/u/146431939?v=4" width="70;" alt="Rishisihare90"/>
Expand All @@ -158,21 +165,14 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<br />
<sub><b>XARTAN21</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/chengm405">
<img src="https://avatars.githubusercontent.com/u/146371159?v=4" width="70;" alt="chengm405"/>
<br />
<sub><b>chengm405</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/komal7141">
<img src="https://avatars.githubusercontent.com/u/75818108?v=4" width="70;" alt="komal7141"/>
<br />
<sub><b>komal7141</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/gulshankapse">
Expand Down Expand Up @@ -252,21 +252,28 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<sub><b>PranjalKhatri</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/shlok-2003">
<img src="https://avatars.githubusercontent.com/u/103599796?v=4" width="70;" alt="shlok-2003"/>
<br />
<sub><b>shlok-2003</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/codewithana">
<img src="https://avatars.githubusercontent.com/u/144683532?v=4" width="70;" alt="codewithana"/>
<br />
<sub><b>codewithana</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/miragearush">
<img src="https://avatars.githubusercontent.com/u/80736891?v=4" width="70;" alt="miragearush"/>
<br />
<sub><b>miragearush</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/s-xiae">
<img src="https://avatars.githubusercontent.com/u/146371043?v=4" width="70;" alt="s-xiae"/>
Expand Down Expand Up @@ -302,6 +309,14 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<sub><b>gourshabrg</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/gaurav12devloper">
<img src="https://avatars.githubusercontent.com/u/55048950?v=4" width="70;" alt="gaurav12devloper"/>
<br />
<sub><b>gaurav12devloper</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/ahmad-kaif">
<img src="https://avatars.githubusercontent.com/u/113821761?v=4" width="70;" alt="ahmad-kaif"/>
Expand All @@ -315,8 +330,7 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<br />
<sub><b>Raghav354</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/AmitRajput1772">
<img src="https://avatars.githubusercontent.com/u/123803673?v=4" width="70;" alt="AmitRajput1772"/>
Expand Down Expand Up @@ -351,22 +365,15 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<br />
<sub><b>abhay5624</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/gaurav12devloper">
<img src="https://avatars.githubusercontent.com/u/55048950?v=4" width="70;" alt="gaurav12devloper"/>
<br />
<sub><b>gaurav12devloper</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/BidyasagarAnupam">
<img src="https://avatars.githubusercontent.com/u/68635333?v=4" width="70;" alt="BidyasagarAnupam"/>
<br />
<sub><b>BidyasagarAnupam</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/Divyanshu723">
<img src="https://avatars.githubusercontent.com/u/112752057?v=4" width="70;" alt="Divyanshu723"/>
Expand Down Expand Up @@ -408,15 +415,15 @@ Features 🎉 Supports a variety of fonts, including standard fonts, decorative
<br />
<sub><b>VikashBurman</b></sub>
</a>
</td>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/abhishekyadav76">
<img src="https://avatars.githubusercontent.com/u/132427787?v=4" width="70;" alt="abhishekyadav76"/>
<br />
<sub><b>abhishekyadav76</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/pronajit">
<img src="https://avatars.githubusercontent.com/u/98771979?v=4" width="70;" alt="pronajit"/>
Expand Down

0 comments on commit 5d059b7

Please sign in to comment.