Skip to content

FontAwesome only user icon works #57

@hniehorster

Description

@hniehorster

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');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions