Opened 9 years ago

Closed 4 years ago

#5966 closed Bug (duplicate)

NormalizeCSS shouldn't lowercase font style attributes

Reported by: Charlie Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.4.1
Keywords: Cc:


Currently, there is no way to specify a font family which has uppercase characters. It is noted in the CSS Specifications that font families can be case sensitive on certain systems (Just like links).

Thus when a font family gets passed through the normalizeCssText function. It is always made lower case. This shouldn't happen...

Note that this is not the same problem as the browser touching of font-family like #5528 deals with

Change History (13)

comment:1 Changed 9 years ago by Tobiasz Cudnik

Keywords: Confirmed added

To be clear, it's related to styles plugin. If you type font name by hand, it won't be lower cased.

comment:2 Changed 9 years ago by Charlie

Version: 3.4.1 (SVN - trunk)

comment:3 Changed 9 years ago by Charlie

Keywords: Confirmed added

comment:4 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Confirmed removed

comment:5 Changed 8 years ago by Alfonso Martínez de Lizarrondo

Dup of #5930

comment:6 Changed 6 years ago by Jakub Ś

I think the problem is parseCssText method where font-family is set to lower case.

It can be reproduced in both CKE 3.x and 4.x.

comment:7 Changed 6 years ago by Piotrek Koszuliński


comment:8 Changed 6 years ago by Piotrek Koszuliński

There's a reason why font names are converted to lower case - #7322. We need to investigate whether these cases do not exclude themselves.

comment:9 Changed 6 years ago by Piotrek Koszuliński

Related issue: #10750.

comment:10 Changed 5 years ago by Roy Shoa

Last edited 5 years ago by Roy Shoa (previous) (diff)

comment:11 in reply to:  10 Changed 5 years ago by Roy Shoa

Replying to royshoa:

Are there is any way to prevent from the CKEditor to change the font-family property value to lower case ?

I'am having a problem using Google Fonts. When I need to make the API request for a font it must be in case sensitive and I make the request according to the font that the user choose in my CKEditor font plugin.

If the CKEditor change the font to lower case and I make a request to Google Fonts API I do not get the font CSS.

Did anyone can give me a solution that I can use (even in my plugin) to fix this?

This is the code that I am using now to change the font:

		var style = new {
			element: 'span',
			styles: { 'font-family': myFontFamily }

The variable "myFontFamily" can get Arial but the CKEditor add it as: arial.

comment:12 Changed 4 years ago by Jakub Ś

I have decided to close this ticket as DUP of #10750 and make the #10750 general ticket for this problem.

comment:13 Changed 4 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy