Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fonts selection mechanism & directory structure #3

Merged
merged 4 commits into from
Jun 9, 2013
Merged

Fonts selection mechanism & directory structure #3

merged 4 commits into from
Jun 9, 2013

Conversation

pdalfarr
Copy link
Contributor

@pdalfarr pdalfarr commented Jun 8, 2013

  • add font auto selection mechanism if 'font => arial.ttf' is not defined in module.config
  • moved font folder in module root directory
  • use system temporary directory for image generation
  • add 2 others font to illustrate random font selection without 'font' defined in module.config
  • use scandir & DIRECTORY_SEPARATOR to work on all OS

}
else // or search for availalbe fonts and pick one
{
exec('ls ' . $spec['options']['fontDir'], $fileList);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about windows os ? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just added DIRECTORY_SEPARATOR instead of hardcoded '/'.
About exec ('ls ...), I now use
$fileList = scandir($DIR);

@pdalfarr
Copy link
Contributor Author

pdalfarr commented Jun 8, 2013

Hi,

I changed a bit the code so it should work on windows as well.

Let me know if it's OK.

samsonasik added a commit that referenced this pull request Jun 9, 2013
Fonts selection mechanism & directory structure
@samsonasik samsonasik merged commit 39503f8 into samsonasik:master Jun 9, 2013
@samsonasik
Copy link
Owner

Thanks @pdalfarr , merged ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants