Ticket #5966 (confirmed Bug)

Opened 4 years ago

Last modified 8 months ago

NormalizeCSS shouldn't lowercase font style attributes

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

Description

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

comment:1 Changed 4 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 4 years ago by comp615

  • Version set to 3.4.1 (SVN - trunk)

comment:3 Changed 4 years ago by comp615

  • Keywords Confirmed added

comment:4 Changed 4 years ago by fredck

  • Keywords Confirmed removed

comment:5 Changed 4 years ago by alfonsoml

Dup of #5930

comment:6 Changed 13 months 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 13 months ago by Reinmar

CC

comment:8 Changed 13 months 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 12 months ago by Reinmar

Related issue: #10750.

comment:10 follow-up: ↓ 11 Changed 8 months ago by royshoa

Last edited 8 months ago by royshoa (previous) (diff)

comment:11 in reply to: ↑ 10 Changed 8 months 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 CKEDITOR.style( {
			element: 'span',
			styles: { 'font-family': myFontFamily }
		});
		
		editor.applyStyle(style);

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

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