Made font type a field in the config file

Этот коммит содержится в:
Reed Garmsen
2015-07-29 14:06:15 -07:00
родитель 876a9f642a
Коммит f0a60181fe
4 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@@ -626,7 +626,7 @@ func createProfileImage(username string, userId string) ([]byte, *model.AppError
initial := string(strings.ToUpper(username)[0])
fontBytes, err := ioutil.ReadFile(utils.FindDir("web/static/fonts") + "luximbi.ttf")
fontBytes, err := ioutil.ReadFile(utils.FindDir("web/static/fonts") + utils.Cfg.ImageSettings.InitialFont)
if err != nil {
return nil, model.NewAppError("createProfileImage", "Could not create default profile image font", err.Error())
}

Просмотреть файл

@@ -54,7 +54,8 @@
"PreviewWidth": 1024,
"PreviewHeight": 0,
"ProfileWidth": 128,
"ProfileHeight": 128
"ProfileHeight": 128,
"InitialFont": "luximbi.ttf"
},
"EmailSettings": {
"ByPassEmail" : true,

Просмотреть файл

@@ -54,7 +54,8 @@
"PreviewWidth": 1024,
"PreviewHeight": 0,
"ProfileWidth": 128,
"ProfileHeight": 128
"ProfileHeight": 128,
"InitialFont": "luximbi.ttf"
},
"EmailSettings": {
"ByPassEmail" : true,

Просмотреть файл

@@ -74,6 +74,7 @@ type ImageSettings struct {
PreviewHeight uint
ProfileWidth uint
ProfileHeight uint
InitialFont string
}
type EmailSettings struct {