Jump to content


Photo

Subtitle and Italic

Enigma2

  • Please log in to reply
80 replies to this topic

Re: Subtitle and Italic #41 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 29 January 2011 - 18:37

I agree with pieterg. I have never seen so far stuff like this:

<i>Go and get it</i>
<b>yes sir</b>

It won't make sense
the italics used for voices that are not in the picture or voice-over

Re: Subtitle and Italic #42 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 29 January 2011 - 23:59

Not the best code I wrote in my life but this should quick fix the </i><i> and anyway it's better than text = text.substr(3, text.length()-7);

https://github.com/l...5ca3ec669daa65c

Re: Subtitle and Italic #43 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 30 January 2011 - 00:06

And if we have Regex I would suggest this, instead of the above:

text = Regex.Replace(text, @"(<[^>]+>) ", "");


Re: Subtitle and Italic #44 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 30 January 2011 - 00:18

Regarding a font to be used for Italic I would suggest to look into Ubuntu Italic font:

http://font.ubuntu.com/

Re: Subtitle and Italic #45 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 30 January 2011 - 00:26

Actually I have found that there is already an italic font in the /usr/share/fonts folder: hdi.ttf

So what about to modify /usr/share/enigma2/skin_subtitles.xml in this way

<skin>
	<fonts>
		<font filename="valis_enigma.ttf" name="Subs" scale="100" />
			 <font filename="hdi.ttf" name="Subsi" scale="100" />
	</fonts>
	<subtitles>
		<sub name="Subtitle_TTX" font="Subs;34" borderColor="#000000" borderWidth="3" />
		<sub name="Subtitle_Regular" font="Subs;34" foregroundColor="#ffffff" borderColor="#000000" borderWidth="3" />
		<sub name="Subtitle_Bold" font="Subs;34" foregroundColor="#ffffff" borderColor="#000000" borderWidth="3" />
		<sub name="Subtitle_Italic" font="Subsi;34" foregroundColor="#ffffff" borderColor="#000000" borderWidth="3" />
	</subtitles>
</skin>


Re: Subtitle and Italic #46 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 30 January 2011 - 00:33

hdi.ttf problably belongs to some skin you installed, it's not there by default yet, most likely

Re: Subtitle and Italic #47 VU+NL

  • Senior Member
  • 6,424 posts

+12
Neutral

Posted 30 January 2011 - 06:26

hdi.ttf is being installed by the Magic-HD skins (and maybe others as well).
VU+ DUO/UNO/Digiality 85cm multifocus-4 X twin-Inverto-LNB's/Triax 88 USALS/Logitech Harmony 300, 555, 600, 900 en 1100

Re: Subtitle and Italic #48 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 30 January 2011 - 11:39

I would go for color codes... make italic yellow and bold (light) green... I know it is a work-a-round but with help of the color escape codes we could simply make some replacements. (replace <i> by escape code for yellow, replace </i> by escape code for white etc..).

In addition the subtitle fonts could be stripped down to just one... the sub font.

Please note this is just a suggestion... And I think even better then loading different fonts.

Pieterg, I still do not understand 100% how the color excape codes are working. Was it \cXXXXXXXX were XXXXXXXX is the color in hex code?

Re: Subtitle and Italic #49 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 31 January 2011 - 13:00

Let's go with yellow!
ok for me

Re: Subtitle and Italic #50 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 January 2011 - 13:52

Pieterg, I still do not understand 100% how the color excape codes are working. Was it \cXXXXXXXX were XXXXXXXX is the color in hex code?


I added an eString cast operator in gRGB I believe, to do the job. (or the other way around, a + gRGB operator in eString, don't remember exactly)

Re: Subtitle and Italic #51 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 31 January 2011 - 14:43

Probably next weekend I'll take a look for this.. I suggest to make make Italic cyan and bold yellow.

Re: Subtitle and Italic #52 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 31 January 2011 - 15:45

I only have to convert the gRGB color with (std::string)color simple...

Re: Subtitle and Italic #53 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 1 February 2011 - 19:02

FYI: http://openpli.git.s...cd98c68d97866c2

Re: Subtitle and Italic #54 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 1 February 2011 - 21:15

Splendid!

I am looking forward to update tomorrow :)
Thank you!

Re: Subtitle and Italic #55 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 1 February 2011 - 22:05

nice clean and simple patch

Re: Subtitle and Italic #56 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 2 February 2011 - 13:52

;-) Thanks...

For me it was a complicated patch if we really want to do italic an bold in the correct way... -or- this simple one.

I want to remove the faces here en select the Sub font on also a nice simple way. But I'm scared that some skins may not work... so a bit of it I have to keep in there.

Re: Subtitle and Italic #57 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 3 February 2011 - 21:30

Hi!

I am wondering if it's just me who has these problem
I have update yesterday evening (GMT+1) and I have these symptoms:
1) Italic is rendered this way

FIRST LINE
			  SECOND LINE
							   LAST LINE

2) Many segments are not displayed at all.

Could anyone give it a try with a .srt file in the media player?

Re: Subtitle and Italic #58 littlesat

  • PLi® Core member
  • 57,110 posts

+698
Excellent

Posted 3 February 2011 - 22:20

I tested it here with even italic and bold within a line and it was working fine... Please give me the part of the srt that is doing strange... you should see not italic, but cyan colored letters.

Re: Subtitle and Italic #59 libolibo

  • Senior Member
  • 81 posts

0
Neutral

Posted 4 February 2011 - 07:31

Sure I see cyan, but the text in the segment gets somehow disaligned.
I try to get a screen dump tonight.

talk later

have a nice day

Re: Subtitle and Italic #60 TheMystery

  • Senior Member
  • 395 posts

+2
Neutral

Posted 4 February 2011 - 08:01

I have the same behaviour.



3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users