<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 7, 2015 at 12:57 PM, Stefan D <span dir="ltr"><<a href="mailto:raptorjr08@gmail.com" target="_blank">raptorjr08@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="h5"><div class="gmail_quote">On Tue, May 5, 2015 at 11:28 PM, Jim Stichnoth <span dir="ltr"><<a href="mailto:stichnot@gmail.com" target="_blank">stichnot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, May 5, 2015 at 11:45 AM, Stefan D <span dir="ltr"><<a href="mailto:raptorjr08@gmail.com" target="_blank">raptorjr08@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Don't know how i could miss that about teletext :P I really was(am) stupid =)<br><br></div>Has anything changes recently? Because the subtitles is much bigger than they were before, maybe 6 months ago. I know that they have been smaller.<br></div></div></div></blockquote><div><br></div></span><div>Very little has changed in a long time with that form of teletext, apart from specifying the font name in the .xml file rather than a mythfrontend settings page.</div><div><br></div><div>One of the teletext commands is to display double-size characters.  I think most providers specify double-size (but being in the U.S., I don't know for sure).</div><span><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div>But sure, if it is not supported i just have to wait until support is added, if ever. But the biggest problem is the lack of the Swedish characters. I've been trying different fonts, and different encodings. And i did have the Swedish characters before my "accidental" upgrade of Ubuntu and MythTV.<br><br></div>Is there anything I can do, debug wise, to find out f.ex. what encoding i should use? Now i have ISO-8559-1 (also tried ISO-8559-4) but still no Swedish characters. And what i have found on the web, that should contain Swedish characters?<br></div></blockquote><div><br></div></span><div>The encoding setting is only for subtitles loaded from external text files, usually .srt or .sub files.</div><div><br></div><div>Are you sure you're installing your font files correctly and in the right place?  Look in your log output for lines like this:</div><div>  "Failed to load '%1', got '%2' instead"</div><div>And if you run with "-v gui:debug", that log message will be followed by a list of available fonts known to MythTV.</div><div><br></div><div>Also keep in mind that if characters are missing from the current font, Qt will silently substitute "equivalent" characters from a font it thinks is similar.</div><div><br></div><div>If you still can't get the fonts working, you may want to upload a small sample recording somewhere that demonstrates the problem.</div><span><font color="#888888"><div><br></div><div>Jim</div></font></span><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Tue, May 5, 2015 at 6:03 PM, Jim Stichnoth <span dir="ltr"><<a href="mailto:stichnot@gmail.com" target="_blank">stichnot@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Mon, May 4, 2015 at 2:01 PM, Stefan D <span dir="ltr"><<a href="mailto:raptorjr08@gmail.com" target="_blank">raptorjr08@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Thank you for your help, but I am feeling really stupid. I can't get anything to work.<br><br></div>Since i don't know what font to use that have the Swedish characters I thought I should first get my semi transparent background.<br><br></div>Found an exampel from another theme that first did this:<br><shape name="grey_background" from="provider"><br>          <type>box</type><br>          <fill color="#000000" alpha="128" /><br></shape><br><br></div>Using mythfrontend -v vbi:debug I found out this:<br></div>The file used is  Location: /home/stefan/.mythtv/themes/Mythbuntu/osd_subtitle.xml<br></div>And the subtitle type used is:<br>GetFont(family=teletext, prefix=teletext, orig pixelSize=20, new pixelSize=20 zoom=100) = face=Liberation Sans pixelsize=20 color=#ffffff italics=0 weight=50 underline=0 shadow=0 shadowoffset=(0,0) shadowcolor=#000000 shadowalpha=255 outline=0 outlinecolor=#000000 outlinesize=0 outlinealpha=255<br></div></div></div></div></blockquote><div><br></div></span><div>OK, this would be the problem.  There's a big "Note" in <a href="https://www.mythtv.org/wiki/Osd_subtitle.xml" target="_blank">https://www.mythtv.org/wiki/Osd_subtitle.xml</a> that for the "teletext" family, the only part of osd_subtitle.xml currently used is the font name.  This restriction (or more accurately, why it's not yet implemented) is for a few reasons:</div><div><br></div><div>1. The teletext commands are pretty specific about setting foreground and background colors (and whether the background is transparent), making it hard to devise a way to selectively control some of the attributes.</div><div><br></div><div>2. Teletext has this interactive feature that other subtitle families lack.</div><div><br></div><div>3. Teletext has non-textual "mosaics" which are like low-res graphics.</div><div><br></div><div>That said, if the only customization you want (other than font choice) is to change the transparency level of subtitles marked as non-transparent, that would be much easier to fit into the existing model.  To hack it in the source code by hand, look in teletextscreen.cpp in TeletextScreen::SetBackgroundColor() for this line:</div><div>    m_bgColor.setAlpha((ttcolor & kTTColorTransparent) ? 0x00 : 0xff);<br></div><div>and change the 0xff value to 128 or whatever you like.</div><div><br></div><div>Going forward, it seems like background alpha, text shadow, and text outline may be properties that would make total sense to draw overrides from osd_subtitle.xml.  Maybe other properties as well.</div><span><font color="#888888"><div><br></div><div>Jim</div></font></span></div></div></div>
<br></div></div><span>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
<br></span></blockquote></div><br></div>
<br>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
<br></blockquote></div></div></div><br></div></div>
<br>_______________________________________________<br>
mythtv-users mailing list<br>
<a href="mailto:mythtv-users@mythtv.org" target="_blank">mythtv-users@mythtv.org</a><br>
<a href="http://lists.mythtv.org/mailman/listinfo/mythtv-users" target="_blank">http://lists.mythtv.org/mailman/listinfo/mythtv-users</a><br>
<a href="http://wiki.mythtv.org/Mailing_List_etiquette" target="_blank">http://wiki.mythtv.org/Mailing_List_etiquette</a><br>
MythTV Forums: <a href="https://forum.mythtv.org" target="_blank">https://forum.mythtv.org</a><br>
<br></blockquote></div><br></div></div><div><div>Good to know that encoding has nothing to do with it, then it is only that the font should contain the characters.<br></div>I know it is not a good font for teletext, but just to use it as an example, Arial.<br><br></div>This is what i get in the mythtv log:<br> D  MythFontProperties: loaded 'Arial'<br>      Location: /home/stefan/.mythtv/themes/Mythbuntu/osd_subtitle.xml @ 59<br>      Name: 'teletext'        Type: 'fontdef'<br><br></div><div class="gmail_extra">Which seems to indicate that the font is found and loaded for teletext.<br>Arial is also in the list of available fonts.<br>Available fonts:<br>2015-05-07 21:29:13.577307 D  Andale Mono:: Regular: 6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72;<br>2015-05-07 21:29:13.577389 D  Arial:: Italic: 6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72; Bold: 6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72; Bold Italic: 6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72; Regular: 6,7,8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72;<br><br></div><div class="gmail_extra">With mythfrontend -vbi:debug i get this in the log when the subtitle is first shown:<br>2015-05-07 21:54:22.528815 D  providerBaseFont = face=FreeMono pixelsize=10 color=#ffffff italics=0 weight=50 underline=0 shadow=0 shadowoffset=(0,0) shadowcolor=#000000 shadowalpha=255 outline=0 outlinecolor=#000000 outlinesize=0 outlinealpha=255<br>2015-05-07 21:54:22.528851 D  negFont = face=FreeMono pixelsize=11 color=#000000 italics=1 weight=19 underline=1 shadow=1 shadowoffset=(1,0) shadowcolor=#ffffff shadowalpha=0 outline=1 outlinecolor=#ffffff outlinesize=1 outlinealpha=0<br>2015-05-07 21:54:22.528884 D  resultFont = face=Arial pixelsize=10 color=#ffffff italics=0 weight=50 underline=0 shadow=0 shadowoffset=(0,0) shadowcolor=#000000 shadowalpha=255 outline=0 outlinecolor=#000000 outlinesize=0 outlinealpha=255<br>2015-05-07 21:54:22.528917 D  testFont = face=Arial pixelsize=11 color=#000000 italics=1 weight=19 underline=1 shadow=1 shadowoffset=(1,0) shadowcolor=#ffffff shadowalpha=0 outline=1 outlinecolor=#ffffff outlinesize=1 outlinealpha=0<br>2015-05-07 21:54:22.528939 I  Subtitle family teletext allows provider to change: italics pixelsize underline bold color<br>2015-05-07 21:54:22.529052 D  GetFont(family=teletext, prefix=teletext, orig pixelSize=20, new pixelSize=20 zoom=100) = face=Arial pixelsize=20 color=#ffffff italics=0 weight=50 underline=0 shadow=0 shadowoffset=(0,0) shadowcolor=#000000 shadowalpha=255 outline=0 outlinecolor=#000000 outlinesize=0 outlinealpha=255<br><br></div><div class="gmail_extra">Also looks like it is the Arial font that is used.<br><br></div><div class="gmail_extra">I have two images I took with my phone on the TV.<br></div><div class="gmail_extra">The first shows a character map for Arial with the Swedish characters, so i know they are a part of the font.<br></div><div class="gmail_extra">The second is a image from a channel with teletext subtitles, showing some other character where the Swedish ones should be.<br><br><a href="http://i59.tinypic.com/2hyyqte.jpg" target="_blank">http://i59.tinypic.com/2hyyqte.jpg</a><br><br><a href="http://i58.tinypic.com/zv2xyc.jpg" target="_blank">http://i58.tinypic.com/zv2xyc.jpg</a><br><br></div><div class="gmail_extra">But maybe I need to make a small recording and upload and hopefully you could find something there?<br></div></div></blockquote><div><br></div><div>Yes - If you could extract a very small snippet of a recording that is 2MB or less, you could attach it to a new ticket.  (Or make a longer excerpt and upload it elsewhere.)  It would be easiest to analyze and test a real file.</div><div><br></div><div>This led me to sections of the MythTV code that I've never looked at before.  For teletext, the Swedish special characters are defined here:</div><div><a href="https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/vbilut.cpp#L14">https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/vbilut.cpp#L14</a></div><div>This table seems to come from page 115 of this spec:</div><div><a href="http://www.etsi.org/deliver/etsi_i_ets/300700_300799/300706/01_60/ets_300706e01p.pdf">http://www.etsi.org/deliver/etsi_i_ets/300700_300799/300706/01_60/ets_300706e01p.pdf</a></div><div>It seems like there are several places where things might go wrong, so I would need to dig into an actual sample to go much further.</div><div><br></div><div>Jim </div></div><br></div></div>