For the most part, trying to figure out the licencing on system fonts is a hassle... You're better off finding a font to distribute with your game. I've used 1001 Free Fonts a ton and they usually come with a readme for distribution details. Then just keep your font library organized and its smooth sailing.Pyuu wrote:The reason I'm curious about this is for common fonts that you can almost bet on existing on most end-user's PCs, such as Arial or Tahoma. Also, detection of those fonts existence and using reasonable alternative fonts based on OS and prepackaged fonts when they don't exist would be a good way to go about not having fonts. (It may cause the experience to differ slightly, but it still avoids the need to go about distribution licenses and potential copyright infringement when packaging the game.)zorg wrote:-snip-
Telling them to get font 'xyz' themselves isn't something you should bank on either.
"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: "Questions that don't deserve their own thread" thread
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: "Questions that don't deserve their own thread" thread
Sometimes a feature like detecting system fonts is usable for example in editing programs, you probably want a dropdown so the user can chose a font, but you don't want to include a lot of fonts with the program itself, and you want to let the user use their own fonts, so detecting available fonts is a good idea. This programs are very specific though, image and video edition software, document processors like Word, Excel, PowerPoint and code editors.
I would like this feature not as a part of LÖVE but as an external library which most likely would have to pick up the available fonts names and then have a function to load any such font and return a LÖVE Font... I'm pretty sure this could be done, if someone has more info please write it, it might spark some interest
I would like this feature not as a part of LÖVE but as an external library which most likely would have to pick up the available fonts names and then have a function to load any such font and return a LÖVE Font... I'm pretty sure this could be done, if someone has more info please write it, it might spark some interest
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: "Questions that don't deserve their own thread" thread
I'm trying to set a randomly rotated image
But i only end up with integers, for example;
The angle of a placed image isn't as random as i'd like it to be. How can i get math.random / love.math.random to choose a random floating number?
EDIT; DO'H math has never been my strong point but this gives what i need;Solved i guess.
But i only end up with integers, for example;
Code: Select all
-- returns 0,1,2,3
love.math.random(math.pi)
-- same as above
love.math.random(0.0, math.pi)
EDIT; DO'H math has never been my strong point but this gives what i need;
Code: Select all
love.math.random(math.pi*10)/10
Re: "Questions that don't deserve their own thread" thread
You could also do
Code: Select all
love.math.random()*math.pi
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- zorg
- Party member
- Posts: 3465
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: "Questions that don't deserve their own thread" thread
If you give at least one argument to love.math.random, it will output integers less than the number. You wanted what Nixola wrote.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: "Questions that don't deserve their own thread" thread
I want to export Love2d to my android device.
What's the best way to find the dimensions of my phone?
EDIT: Nvm solved.
What's the best way to find the dimensions of my phone?
EDIT: Nvm solved.
Re: "Questions that don't deserve their own thread" thread
My project is too big for my monitor. I have a Samsung galaxy s6 with the dimensions 1440 x 2560 pixels
How can I test my project on the PC and Android? Or should I just forget about running it on the PC at all.
How can I test my project on the PC and Android? Or should I just forget about running it on the PC at all.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: "Questions that don't deserve their own thread" thread
Android, iOS and Mac use PixelScale (which you can get with [wiki]love.window.getPixelScale[/wiki]), this works like this, if the PixelScale is 4 then 1dip (density independant pixel) is 4 actual pixels. You want to draw with dip units so then you scale everything by the PixelScale and get beutiful results.
So since the S6 has a PixelScale of 4 then you will have a 360dip x 640dip drawing area. And since your computer has a PixelScale of 1 (most systems use this) and it is most likely 800px x 600px (at least) then your monitor has a drawing area of 800dip x 600 dip which is bigger than your phone!
This is useful too because Google recommends a touch target of 48dip which in your phone would be 184px!
NOTE: Calling them dip (density independant pixels/points) is most likely wrong, I just wanted to explain the concept
So since the S6 has a PixelScale of 4 then you will have a 360dip x 640dip drawing area. And since your computer has a PixelScale of 1 (most systems use this) and it is most likely 800px x 600px (at least) then your monitor has a drawing area of 800dip x 600 dip which is bigger than your phone!
This is useful too because Google recommends a touch target of 48dip which in your phone would be 184px!
NOTE: Calling them dip (density independant pixels/points) is most likely wrong, I just wanted to explain the concept
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: "Questions that don't deserve their own thread" thread
I think what you should be using is adjustible screen dimensions. If you use rigid numbers for the screen resolution, then it will only work well for screens with that exact resolution, and will be broken for everything else one way or another.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: "Questions that don't deserve their own thread" thread
Of course, you need a combination of both, I recommend dips for the sake of touch input (Hell having a 48px button on a screen with 4x pixel scale would be a pain) but then you have to dynamically resize your drawing area because your phone may be 360x640 but other may be 320x600 and so on... So the size and or aspect ratio may not be the same and you should adapt to it (which is a pain but one that is needed to give the best user experience everywhere)
SO! Adapt to the user screen dinamically, by scaling, adding black borders or whatever. And make sure that all your input has a good touch target of 48dips!
SO! Adapt to the user screen dinamically, by scaling, adding black borders or whatever. And make sure that all your input has a good touch target of 48dips!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: No registered users and 7 guests