Opened 14 years ago

Closed 9 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:

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 (13)

comment:1 Changed 14 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 14 years ago by Charlie

Version: 3.4.1 (SVN - trunk)

comment:3 Changed 14 years ago by Charlie

Keywords: Confirmed added

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Confirmed removed

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

Dup of #5930

comment:6 Changed 11 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 11 years ago by Piotrek Koszuliński

CC

comment:8 Changed 11 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 11 years ago by Piotrek Koszuliński

Related issue: #10750.

comment:10 Changed 10 years ago by Roy Shoa

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);
Version 1, edited 10 years ago by Roy Shoa (previous) (next) (diff)

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

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

comment:12 Changed 9 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 9 years ago by Jakub Ś

Resolution: duplicate
Status: confirmedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy