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

FontAwesome only user icon works #57

Open
hniehorster opened this issue Jan 27, 2022 · 1 comment
Open

FontAwesome only user icon works #57

hniehorster opened this issue Jan 27, 2022 · 1 comment

Comments

@hniehorster
Copy link

hniehorster commented Jan 27, 2022

Hey,

Two quick questions:

  1. How do I load a custom font?
    Running on Laravel here and generating them (not for users). Any hints? I've tried the resource_path() and the asset() without any luck.

  2. FontAwesome not all icons are supported, I've tried multiple but only seem to ge the user to work. In the example below this should render the question mark.

$image = $avatar->glyph('f128')
                ->font('/fonts/FontAwesome5Free-Regular-400.otf')
                ->size(500)
                ->rounded()
                ->background('#e9655b')
                ->color('#ffffff')
                ->generate();

           return response($image->stream('png', 100))
                ->header('Content-Type','image/png')
                ->header('Pragma','public')
                ->header('Content-Disposition','inline; filename="1231231231231.png"')
                ->header('Cache-Control','max-age=60, must-revalidate');
@hniehorster
Copy link
Author

hniehorster commented Jan 27, 2022

image

Side note, when it renders, it renders a very small font-size, see the attached image

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

No branches or pull requests

1 participant