TrueTypeFontMode 列挙型

定義

TrueType フォントで書式設定されたテキストをプリンターがどのように処理するかを指定します。

public enum class TrueTypeFontMode
public enum TrueTypeFontMode
type TrueTypeFontMode = 
Public Enum TrueTypeFontMode
継承
TrueTypeFontMode

フィールド

Automatic 1

プリンター ドライバーは、TrueType フォントを処理するための最適な方法を決定します。

DownloadAsNativeTrueTypeFont 4

プリンター ドライバーは、TrueType フォントをダウンロードします。

DownloadAsOutlineFont 2

プリンター ドライバーは、TrueType フォントをアウトライン フォントとしてダウンロードします。

DownloadAsRasterFont 3

プリンター ドライバーは、TrueType フォントの各サイズに対応するラスター フォントを作成し、それらをすべてダウンロードします。

RenderAsBitmap 5

プリンター ドライバーは、テキストの各領域をグラフィックスとしてダウンロードします。

Unknown 0

機能 (オプションはこの列挙体によって表されます) が、未定義のオプションに設定されます。 印刷スキーマ

次の例では、プリンターの機能をテストし、それらを利用するように印刷ジョブを構成する方法を示します。

// ---------------------- GetPrintTicketFromPrinter -----------------------
/// <summary>
///   Returns a PrintTicket based on the current default printer.</summary>
/// <returns>
///   A PrintTicket for the current local default printer.</returns>
PrintTicket^ GetPrintTicketFromPrinter ()
{
   PrintQueue^ printQueue = nullptr;

   LocalPrintServer^ localPrintServer = gcnew LocalPrintServer();

   // Retrieving collection of local printer on user machine
   PrintQueueCollection^ localPrinterCollection = localPrintServer->GetPrintQueues();

   System::Collections::IEnumerator^ localPrinterEnumerator = localPrinterCollection->GetEnumerator();

   if (localPrinterEnumerator->MoveNext())
   {
      // Get PrintQueue from first available printer
      printQueue = ((PrintQueue^)localPrinterEnumerator->Current);
   } else
   {
      return nullptr;
   }
   // Get default PrintTicket from printer
   PrintTicket^ printTicket = printQueue->DefaultPrintTicket;

   PrintCapabilities^ printCapabilities = printQueue->GetPrintCapabilities();

   // Modify PrintTicket
   if (printCapabilities->CollationCapability->Contains(Collation::Collated))
   {
      printTicket->Collation = Collation::Collated;
   }
   if (printCapabilities->DuplexingCapability->Contains(Duplexing::TwoSidedLongEdge))
   {
      printTicket->Duplexing = Duplexing::TwoSidedLongEdge;
   }
   if (printCapabilities->StaplingCapability->Contains(Stapling::StapleDualLeft))
   {
      printTicket->Stapling = Stapling::StapleDualLeft;
   }
   return printTicket;
};// end:GetPrintTicketFromPrinter()
// ---------------------- GetPrintTicketFromPrinter -----------------------
/// <summary>
///   Returns a PrintTicket based on the current default printer.</summary>
/// <returns>
///   A PrintTicket for the current local default printer.</returns>
private PrintTicket GetPrintTicketFromPrinter()
{
    PrintQueue printQueue = null;

    LocalPrintServer localPrintServer = new LocalPrintServer();

    // Retrieving collection of local printer on user machine
    PrintQueueCollection localPrinterCollection =
        localPrintServer.GetPrintQueues();

    System.Collections.IEnumerator localPrinterEnumerator =
        localPrinterCollection.GetEnumerator();

    if (localPrinterEnumerator.MoveNext())
    {
        // Get PrintQueue from first available printer
        printQueue = (PrintQueue)localPrinterEnumerator.Current;
    }
    else
    {
        // No printer exist, return null PrintTicket
        return null;
    }

    // Get default PrintTicket from printer
    PrintTicket printTicket = printQueue.DefaultPrintTicket;

    PrintCapabilities printCapabilities = printQueue.GetPrintCapabilities();

    // Modify PrintTicket
    if (printCapabilities.CollationCapability.Contains(Collation.Collated))
    {
        printTicket.Collation = Collation.Collated;
    }

    if ( printCapabilities.DuplexingCapability.Contains(
            Duplexing.TwoSidedLongEdge) )
    {
        printTicket.Duplexing = Duplexing.TwoSidedLongEdge;
    }

    if (printCapabilities.StaplingCapability.Contains(Stapling.StapleDualLeft))
    {
        printTicket.Stapling = Stapling.StapleDualLeft;
    }

    return printTicket;
}// end:GetPrintTicketFromPrinter()
' ---------------------- GetPrintTicketFromPrinter -----------------------
''' <summary>
'''   Returns a PrintTicket based on the current default printer.</summary>
''' <returns>
'''   A PrintTicket for the current local default printer.</returns>
Private Function GetPrintTicketFromPrinter() As PrintTicket
    Dim printQueue As PrintQueue = Nothing

    Dim localPrintServer As New LocalPrintServer()

    ' Retrieving collection of local printer on user machine
    Dim localPrinterCollection As PrintQueueCollection = localPrintServer.GetPrintQueues()

    Dim localPrinterEnumerator As System.Collections.IEnumerator = localPrinterCollection.GetEnumerator()

    If localPrinterEnumerator.MoveNext() Then
        ' Get PrintQueue from first available printer
        printQueue = CType(localPrinterEnumerator.Current, PrintQueue)
    Else
        ' No printer exist, return null PrintTicket
        Return Nothing
    End If

    ' Get default PrintTicket from printer
    Dim printTicket As PrintTicket = printQueue.DefaultPrintTicket

    Dim printCapabilities As PrintCapabilities = printQueue.GetPrintCapabilities()

    ' Modify PrintTicket
    If printCapabilities.CollationCapability.Contains(Collation.Collated) Then
        printTicket.Collation = Collation.Collated
    End If

    If printCapabilities.DuplexingCapability.Contains(Duplexing.TwoSidedLongEdge) Then
        printTicket.Duplexing = Duplexing.TwoSidedLongEdge
    End If

    If printCapabilities.StaplingCapability.Contains(Stapling.StapleDualLeft) Then
        printTicket.Stapling = Stapling.StapleDualLeft
    End If

    Return printTicket
End Function ' end:GetPrintTicketFromPrinter()

注釈

TrueType フォントは ベクター フォントで、プリンター ドライバーとスクリーン ドライバーに文字の図形を描画して塗りつぶす方法を指示します。 ベクター フォントは、単にリストである ラスター フォントとは対照的です。 ラスター フォントには、使用可能な各フォント サイズの各文字のリストが含まれており、その一覧によって、文字内のすべてのピクセルに対して印刷するかどうかが決まります。

ベクター フォントは、ほぼ任意のポイント サイズに拡大または縮小できます。ただし、ベクター フォントは大量のプリンター メモリを占有するため、印刷が遅くなる可能性があります。 また、一部のプリンターでは TrueType フォントがサポートされていません。

新しいプリンターでは、多くの場合、次の操作を行うことで、これらの問題を回避できます。

  • TrueType フォントをアウトライン フォント (汎用ベクター フォント) に変換します。 TrueType フォントをサポートしていない多くのプリンターでは、アウトライン フォントがサポートされています。

  • TrueType フォントに似た一時的なラスター フォントを作成する。 プリンターは、ドキュメントで使用するフォント サイズごとに個別の一時ラスター フォントを作成する必要があります。 そのため、印刷ジョブで多数のフォント サイズを使用する場合、プリンターが使用するメモリの合計が TrueType フォントで使用されるメモリよりも大きくなる可能性があります。

  • ドキュメント内の各テキスト領域をグラフィックとして扱う。 非常に少ないテキストを含むドキュメントをデバイスで印刷する必要がある場合、グラフィックとしてテキストをダウンロードすると、フォントをダウンロードするよりもプリンターのメモリが少なくて済みます。

次の目的で、この型の値を使用します。

  • のプロパティである コレクションの TrueTypeFontModeCapability メンバーとして、これらの値は、特定の PrintCapabilitiesプリンターで使用できる上記の手法を示します。 多くのプリンターでは、これらの手法の 1 つ以上がサポートされています。

  • の プロパティの TrueTypeFontMode 値として、 値は、特定の PrintTicket方法で TrueType フォントを処理するようにプリンターに指示します。

Unknown 値は、オブジェクトのPrintCapabilitiesプロパティでは使用されません。

プロパティを Unknown に設定PrintTicketしないでください。 TrueType フォント処理機能を認識できないオプション (つまり、印刷スキーマで定義されていないオプション) に設定する PrintTicket ドキュメントを他PrintTicketの生成アプリケーションが作成した場合、PrintTicketそのドキュメントで構築されたアプリケーション内のオブジェクトは、プロパティのTrueTypeFontMode値として Unknown になります。

クラスと PrintCapabilities クラスはPrintTicket継承できませんが、 クラスまたは PrintCapabilities クラスで考慮されていない印刷デバイス機能を認識するように印刷スキーマPrintTicket拡張できます。 詳細については、「 方法: 印刷スキーマを拡張する」および「新しい印刷システム クラスを作成する」を参照してください。

適用対象

こちらもご覧ください