Opened 7 years ago

Closed 22 months ago

#5966 closed Bug (duplicate)

NormalizeCSS shouldn't lowercase font style attributes

Reported by: comp615 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 7 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 7 years ago by comp615

  • Version set to 3.4.1 (SVN - trunk)

comment:3 Changed 7 years ago by comp615

  • Keywords Confirmed added

comment:4 Changed 7 years ago by fredck

  • Keywords Confirmed removed

comment:5 Changed 7 years ago by alfonsoml

Dup of #5930

comment:6 Changed 4 years ago by j.swiderski

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 4 years ago by Reinmar


comment:8 Changed 4 years ago by Reinmar

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 4 years ago by Reinmar

Related issue: #10750.

comment:10 follow-up: Changed 4 years ago by royshoa

Last edited 4 years ago by royshoa (previous) (diff)

comment:11 in reply to: ↑ 10 Changed 4 years ago by royshoa

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 22 months ago by j.swiderski

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

comment:13 Changed 22 months ago by j.swiderski

  • Resolution set to duplicate
  • Status changed from confirmed to closed
Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy