Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Null78 committed Apr 16, 2021
1 parent 2229c10 commit 77a5dcb
Show file tree
Hide file tree
Showing 5 changed files with 466 additions and 0 deletions.
Binary file added arial.ttf
Binary file not shown.
Binary file added careem.ttf
Binary file not shown.
14 changes: 14 additions & 0 deletions image.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
// header('Content-Type: image/png');
include 'word2uni.php';
$image = imagecreatetruecolor(200, 75);
imagefill($image, 0, 0, 0xaaaaaa);
if(isset($_GET['word'])) {
$text = text2uni($_GET['word']);
} else {
$text = text2uni('مرحبا');
}
$font = __DIR__. '/careem.ttf';
imagettftext($image, 25, 0, 20, 50, 0x000000, $font, $text);
imagepng($image);
?>
21 changes: 21 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>word2uni Example</title>
<script type="text/javascript">
function change_image()
{
document.getElementById("image").src = 'image.php?word='+document.getElementById("word").value
}
</script>
</head>
<body>

<input type="text" id="word">
<input type="button" onclick="change_image()" value="غير">
<br>
<img src="image.php" id="image">
</body>

</html>
Loading

0 comments on commit 77a5dcb

Please sign in to comment.