Whitter Posted April 27, 2015 Share Posted April 27, 2015 How to change "font size" in PHP? $print_username = "Username: $GetPlayerName"; $print_score = "Score: $GetPlayerScore"; $print_money = "Money: $GetPlayerMoney"; Font size is small, I want to make it bigger. Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/ Share on other sites More sharing options...
Barand Posted April 27, 2015 Share Posted April 27, 2015 You can't in PHP. You use CSS on the client. EG <html>> <head> <style type="text/css"> body { font-size: 24pt; } </style> </head> <body> <?php echo "Hello World";?> </body> </html> Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/#findComment-1510109 Share on other sites More sharing options...
Whitter Posted April 27, 2015 Author Share Posted April 27, 2015 Thanks. Another thing, how can I do "outline" text in php? Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/#findComment-1510114 Share on other sites More sharing options...
Barand Posted April 27, 2015 Share Posted April 27, 2015 See my previous reply. AFAIK CSS doesn't support outline font-style so you may need to specify an outline font. Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/#findComment-1510115 Share on other sites More sharing options...
Psycho Posted April 27, 2015 Share Posted April 27, 2015 Yes, you can do outline font in CSS, although it won't be supported in all browsers: https://css-tricks.com/adding-stroke-to-web-text/ body { font-size: 24pt; -webkit-text-fill-color: #ffffff; -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: #000000; } Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/#findComment-1510125 Share on other sites More sharing options...
Barand Posted April 27, 2015 Share Posted April 27, 2015 I'm guessing you could also do it using SVG text. Link to comment https://forums.phpfreaks.com/topic/295900-font-size-in-php/#findComment-1510130 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.