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

Why is 'normal' font weight always being applied in createTextStyle function? #277

Closed
become-iron opened this issue Jan 17, 2020 · 6 comments
Assignees

Comments

@become-iron
Copy link
Contributor

let font = ['normal', fontSize, vlStyle.textFont].filter(x => !!x).join(' ')

It prevents to set custom font weight, doesn't it?

@become-iron
Copy link
Contributor Author

Also I wonder if font size should always be in pixels

let fontSize = vlStyle.textFontSize ? vlStyle.textFontSize + 'px' : undefined

@ghettovoice ghettovoice self-assigned this Jan 20, 2020
@ghettovoice
Copy link
Owner

Hello @become-iron !
You are right, this place can be improved to allow user to setup this style options.
For a while, if you stack with this, use OpenLayers native style constructors

@stale
Copy link

stale bot commented Mar 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 20, 2020
@become-iron
Copy link
Contributor Author

@ghettovoice Is it possible to protect issues from the stale bot?

@stale stale bot removed the stale label Mar 20, 2020
@ghettovoice
Copy link
Owner

Yes, thank for reminding me of that

ghettovoice added a commit that referenced this issue Mar 30, 2020
@ghettovoice
Copy link
Owner

Done.
You can set font weight with textFontWeight. And textFontSize now can accept strings with sizes defined in units other than px.

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

No branches or pull requests

2 participants