equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
96 } |
96 } |
97 |
97 |
98 |
98 |
99 void CBDFHarness::ConstructL() |
99 void CBDFHarness::ConstructL() |
100 { |
100 { |
101 User::LeaveIfError(RFbsSession::Connect()); |
101 RFbsSession::Connect(); |
102 iFbs = RFbsSession::GetSession(); |
102 iFbs = RFbsSession::GetSession(); |
103 if (iFbs == NULL) |
103 if (iFbs == NULL) |
104 User::Leave(KErrGeneral); |
104 User::Leave(KErrGeneral); |
105 iDev = CFbsScreenDevice::NewL(_L("scdv"),EGray4); |
105 iDev = CFbsScreenDevice::NewL(_L("scdv"),EGray4); |
106 iDev->ChangeScreenDevice(NULL); |
106 iDev->ChangeScreenDevice(NULL); |
126 RFbsSession::Disconnect(); |
126 RFbsSession::Disconnect(); |
127 iTest.Close(); |
127 iTest.Close(); |
128 } |
128 } |
129 |
129 |
130 |
130 |
131 void CBDFHarness::MakeBDFFontL() |
131 void CBDFHarness::MakeBDFFont() |
132 { |
132 { |
133 TOpenFontFaceAttrib attrib; |
133 TOpenFontFaceAttrib attrib; |
134 iStandardFont->GetFaceAttrib(attrib); |
134 iStandardFont->GetFaceAttrib(attrib); |
135 TPtrC familyName = attrib.FamilyName(); |
135 TPtrC familyName = attrib.FamilyName(); |
136 TPtrC fullName = attrib.LocalFullName(); |
136 TPtrC fullName = attrib.LocalFullName(); |
138 iStandardFont->GetFontMetrics(fMetrics); |
138 iStandardFont->GetFontMetrics(fMetrics); |
139 iPPEM = fMetrics.Size(); |
139 iPPEM = fMetrics.Size(); |
140 |
140 |
141 // Open file session |
141 // Open file session |
142 RFs file_session; |
142 RFs file_session; |
143 User::LeaveIfError(file_session.Connect()); |
143 file_session.Connect(); |
144 file_session.MkDir(_L("\\BDFfonts\\")); |
144 file_session.MkDir(_L("\\BDFfonts\\")); |
145 // Open file |
145 // Open file |
146 RFile file; |
146 RFile file; |
147 buffer.Format(_L("\\BDFfonts\\%S %d.bdf"), &fullName, iPPEM); |
147 buffer.Format(_L("\\BDFfonts\\%S %d.bdf"), &fullName, iPPEM); |
148 file.Replace(file_session, buffer, EFileShareAny); |
148 file.Replace(file_session, buffer, EFileShareAny); |